ASP.NET Core and Azure Timezone Problem

24/11/2017 20:09:55

One of the problems I ran into when we recently deployed our ASP.NET Core web app to Azure was a difference in time of exactly 1 hour between my local development environment and the time in the web app on Azure.

At first I thought it had something to do with my ASP.NET Core application configuration, but searching the internet did not result in any timezone configuration option in ASP.NET Core. Changing my seach to focus on Azure Web App configuration gave the following website with the solution:

However, the solution on this website did not work! It took me 20 minutes to figure out that the exact spelling of the timezone is very important. In the example the spelling for (also) my timezone is given as "W.Europe Standard Time", while the exact spelling needs a space after the dot like so: "W. Europe Standard Time". 

If anyone is struggling with the timezone in Azure because of spelling, hope this will help you to find the problem :)