WEBSITE_TIME_ZONE is set but not going through the app setting

Milad Ildoromi 1 Reputation point

I set the WEBSITE_TIME_ZONE in the application setting to New Zealand Standard Time

And in the console when I check the date

it has not been applied, I went to the resource explorer and checked the value in the config which is set to null
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

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



    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.


    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