WEBSITE_TIME_ZONE is set but not going through the app setting

Milad Ildoromi 1 Reputation point
2021-05-07T04:29:37.833+00:00

I set the WEBSITE_TIME_ZONE in the application setting to New Zealand Standard Time
94616-image.png

And in the console when I check the date
94520-image.png

it has not been applied, I went to the resource explorer and checked the value in the config which is set to null
94459-image.png
Any ideas?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,397 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 20,781 Reputation points
    2021-05-07T14:24:56.857+00:00

    Thanks for asking question! Could you please confirm after setting WEBSITE_TIME_ZONE variable in Application settings you have saved and restarted the app.

    94787-demoq1.png

    94739-demoq3.png

    You may refer to this article for supported timezone values.

    further to verify that whether offset is updated or not navigate to Console and execute time command.

    94740-demoq2.png

    Also, for the App services that run on Windows, see the Timezone column in the Default Time Zones article for accepted values. For the App services that run on Linux, set the TZ database name as the time zone value.

    Note that the above setting works without making any changes in the code. TimeZoneInfo.ConvertTimeBySystemTimeZoneId.
    If you used the overload that accepts a DateTime, then be aware that if .Kind is DateTimeKind.Unspecified then it will be treated as local time.

    If you didn't change the WEBSITE_TIME_ZONE, then the default local time is UTC. But if you did, then that would affect the behavior.

    You may also check this doc for more details on converting times between timezones.

    Let us know if further query or issue remains.

    2 people found this answer helpful.
    0 comments No comments