Manage Timezones in App Service Linux
By default, the time zone for the app is always UTC. You can change it to any of the valid values that are listed in TZ timezones.
If the specified value isn’t recognized, UTC is used. There is a different between Windows and Linux, for Windows check this reference.
Configuration
To configure the timezone it is really simple, you need to identify the correct value from the TZ database list and then add an app setting from Configuration and then Application Settings.
You can use WEBSITE_TIME_ZONE
or TZ
app setting with the correct value.
This change will restart the container, then you can use WebSSH and check the current date with the change.
Troubleshooting
In case the change is not being updated, you can get the latest tzdata list from the distro repository through apt install tzdata
for Debian based or apk add tzdata
for Alpine images and build a custom startup script. Here is an example for Alpine:
#!/bin/bash
apk update
apk add --no-cache tzdata
cp /usr/share/zoneinfo/$WEBSITE_TIME_ZONE /etc/localtime
echo $WEBSITE_TIME_ZONE > /etc/timezone