Creating Azure App Services is a very simple task. All it takes is to browse the Azure marketplace, go through several steps, and then you are ready for your new adventure. After you have created your new App Service, what if you wish to adjust the App Service time zone from the default UTC?
In this blog post, I will take you through the steps to adjust your App Service time to any time zone you wish.
I’m a big fan of anything related to Azure; in the last several years, I have focused my efforts on building many community tools that help companies easily automate some of their daily tasks to better maximize returns and reduce operating costs. With no exceptions, all the tools I have developed are built on top of the Azure App Services using .Net. Why? to be honest, I don’t know why; I appears that I fell for the .Net name back in 2000 when I got my first IT job. One of the developers in my team had a huge colourful .Net poster that I really liked on the wall. I ended up taking that poster when I left the company five years later.
One of the Web Services default configurations that can be overlooked by the architecture team is the timezone. The timezone is set to UTC by default when Web Services are provisioned. Sometimes this is not a problem; but it requires the development team to adjust the time using code. In some instances, this can cause confusion; though there is a way you can adjust the Web Service time zone to any time zone you wish. Read on to see how you do it.
MS Time Zone List
Before you set your Web Service time zone, you must first set the time zone to the correct format for the specific timezone. The step is simple; from your Windows workstation, run the following command:
Get-TimeZone -ListAvailable | Select-Object StandardName
This command lists all the available time zones in a very easily readable format; you now choose the time zone you need. For example, the Australian Eastern Standard time zone looks like that shown in the screenshot below:
App Services Configuration
After you have copied the desired time zone, head back to your Azure portal, App Services, Configuration; press the plus sign to “Add/Edit application setting” and add the following values:
- Name=WEBSITE_TIME_ZONE
- Value=Eastern Standard Time
Press OK and then Save.
Validate
After you complete the last step, you can open the Web App console (left-hand list) and type “Time”. You can now see the current/new time zone as shown in the screenshot below:
Conclusion
In this short blog post, I demonstrated how to set your Azure Web Services timezone. Those steps above are very simple and can be shared with the Azure architecture team, or any team responsible for provisioning the Web Services to ensure your time zone is correctly set before starting to upload your code.
What do you think?
Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?
Your article helped me a lot, is there any more related content? Thanks!