DEV Community

Discussion on: DateTime.Now: No, no...

Collapse
 
jainkumarvivek profile image
vivek kumar jain

We can change default timezone in App Service by adding a new setting under Application Settings called WEBSITE_TIME_ZONE.
Acceptable values for this setting can be any of the acceptable values defined in the Windows Registry under the key HKLM\Software\Microsoft\Windows Nt\CurrentVersion\Time Zones.

Collapse
 
lbugnion profile image
Laurent Bugnion

That's correct. Like I mentioned in another comment thread, I was merely using App Service as an example to illustrate that the server is running on UTC, but your comment is very correct and appreciated.

Collapse
 
alexeyripenko profile image
Alexey Ripenko

Thank you for this interesting thing. But I think it could be a workaround, but not as right "pattern".

Collapse
 
lbugnion profile image
Laurent Bugnion

I am not quite sure what you think is a workaround. The mere fact I want people to be aware of is that Azure servers run in UTC 😊