I’m working with a customer that has his website deployed in an App Service and from where we store and display date and time.

As a old good practice, we store datetime in UTC and we use some .NET tricks to convert this timezone in the user timezone. In our case, the website is available only to French people so we needed to always display the time in the Timezone “Romance Standard Time”.

Yes, we could have store the time in that timezone directly and just display it to the user, without needed to perform some modifications. But what about if the website is, finally, used by non-French people ?

As a quick fix, I’ve found a simple way to specify the Timezone of your App Service. Indeed, in the configuration, just add a setting named “WEBSITE_TIME_ZONE” with the value you want:

Using this trick, the website runs on the Romance Standard Time so the conversion between UTC and Romance Standard Time is performed automatically 🙂

Happy coding !

Auditing your Azure DevOps Services instance Docker, SQL Server and the "Exited (1)" status

Leave a Reply

Your email address will not be published. Required fields are marked *