Umbraco Cloud Timezone
# help-with-other
s
It isn't possible!
h
Where are you using Date time.Now? If it is in a view you should be able to convert it to display the local time of users browser. If it is in code then it is always best use UTC
You should be able to create a displaytemplate to do so
j
Both, we are migrating a .net framework project to Umbraco, the old .net framework is hosted in our vm, so DateTime.Now is always CST. Just realized that Umbraco is using UTC now. May have to change everything to UTC in the backend.
How can I display local time of users browser in a razor view?
h
You can create displaytemplate, check this on stackexchange , a couple of replies down is a good example https://stackoverflow.com/questions/8144004/asp-net-mvc-controller-view-display-local-time
j
Make sense use js to get browser timezone. Thanks again.
2 Views