问题
We are using azure web app service for multi tenant application. But default time zone of app service is UTC taking i want to change that time zone for that region only.
I have tried WEB_TIMEZONE variable in app setting but not working.
回答1:
You are setting wrong variable. You need to set WEBSITE_TIME_ZONE
variable in Application settings
.
To see supported timezone values see this
To verify that whether offset is updated or not navigate to Console
and execute time
command
Reference: https://kvaes.wordpress.com/2017/01/24/changing-the-timezone-on-your-azure-webapp-app-service-function/
回答2:
You could add an application setting (using the portal) called WEBSITE_TIME_ZONE
equal to the name of the time zone
(as defined in the Windows Registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Nt\CurrentVersion\Time Zones\
).
for example:
Hope it helps you.
回答3:
If your App Service Plan is Linux change you need to set TZ variable in Application settings with your time zone in format like America/Sao_Paulo
Don't forget save and restart App.
Example:
List of time zones in: https://www.php.net/manual/en/timezones.php
回答4:
Just adding to the other answers, you can find the Default Windows Timezones here:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones
You need to set the value contained in the column "Timezone".
来源:https://stackoverflow.com/questions/48760325/azure-web-app-service-time-zone-change-issue