Azure-docs: How to set timezone for LINUX app services in Azure

Created on 17 Jun 2019  Â·  14Comments  Â·  Source: MicrosoftDocs/azure-docs

Is there any way to set the timezone for LINUX app services in azure?
Is there any like the following to Linux app services?
https://www.jasongaylord.com/blog/tip-changing-an-azure-app-service-time-zone

Pri3 app-service-wesvc cxp product-question triaged

Most helpful comment

@SharmaAnshuman,
You could try with this app setting:
image

After setting that, this is the outcome:
image

All 14 comments

@techaimail Thanks for the question! We are investigating and will update you shortly.

@techaimail, Could you please let us know what built-in Docker containers/image are you leveraging? and provide more details on your application framework.

Just to highlight, you could take a look at this generic configuration and management FAQ ‘How do I set the server time zone for my web app?’ which outlines the steps for adding the time zone App settings.

I have tried a similar repro on this and appears to work for NodeJs:
image

If you’ve set WEBSITE_TIME_ZONE and TZ simultaneously, please try clearing WEBSITE_TIME_ZONE, as this will override TZ.

@techaimail, Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion.

@AjayKumar-MSFT I have set the WEBSITE_TIME_ZONE but the time is still incorrect, how can I fix it?
image
Time should be 11:24

joalcava, Apologies for the delay! I noticed that you have already raised a GitHub issue on this.
However, since this channel is reserved for ‘Azure docs’ questions- For doc feedback and content improvements, we recommend posting technical questions on the technical forum where one of our specialized engineers in the subject or the Azure community members can provide the best possible answer to your scenario or question.

@AjayKumar-MSFT Thanks for your response, I have figured out how to solve it. However there is no information about it in the docs, the values on the list of available timezones does only work with Windows.
The values that do work in Linux are the ones retrived by the package tzdata (on debian)

@joalcava Are you setting WEBSITE_TIME_ZONE or TZ env variable?

@scottmckenzie WEBSITE_TIME_ZONE

@AjayKumar-MSFT WEBSITE_TIME_ZONE = 'Asia/Kolkata' not working for linux app service

@SharmaAnshuman,
You could try with this app setting:
image

After setting that, this is the outcome:
image

@AjayKumar-MSFT Thank you, it worked.

@AjayKumar-MSFT it is not working on consumption plan

Thank you @AjayKumar-MSFT , I tested with TZ => Europe/Rome and it works like a charm!

For anyone looking, these TZ codes are different from the Windows codes. Here's the reference database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Was this page helpful?
0 / 5 - 0 ratings