Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Azure»How to Change TimeZone in Azure App Service

    How to Change TimeZone in Azure App Service

    RahulBy RahulApril 13, 20223 Mins ReadUpdated:April 16, 2022

    TimeZone plays an important role for time crucial applications. In that case, you must have to set a proper timezone for the running operating system. One of our users asked about setting up the Timezone in Azure App Services.

    In this tutorial, you will learn how to set the Timezone for an application running on Azure App Services. All the screenshots of this tutorial are made for Windows-based Azure App Service.

    Identify the OS

    You can easily set the Timezone to Windows app service using environment variables but the settings are different for an app service hosted in Linux or Windows.

    To identify the OS type, follow:

    1. Log in to the Azure Portal
    2. Open the Azure app service
    3. Go to Console
    4. On the console Window you will either get a Windows prompt or a Linux shell.

    Find The TimeZone

    The Windows and Linux platforms followed some different string formats for different-2 Timezones. So first you need to find the correct string for the required timezone based on the Azure App Service OS type: To find the string follow:

    • Windows based App Service – Open a PowerShell terminal on a Windows system and run the following command. It will list the Timezone.
      Get-ChildItem -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones' | Select-Object PSChildName
      
    • Linux based App Service – Visit https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
    How to Change Timezone of Azure App Service
    List of Timezone for Windows Environment

    Change TimeZone on Azure App Service

    Now, go through the following steps and configure the application setting with the correct name and value.

    1. Log in to the Azure Portal
    2. Open Azure App Service
    3. On the left-hand sidebar click on Configuration under Settings.
    4. Click on “+ New Application Setting”
    5. Set the environment variables based on OS type:
      • For Windows App Service type Name and Value as:
        Name=WEBSITE_TIME_ZONE
        Value=Eastern Standard Time
      • For Linux App Service type Name and Value as:
        Name=TZ
        Value=America/New_York
    6. Click Ok
    7. Click Save to confirm and save the change.
    How to Set Timezone of Azure App Service
    Setting Up Timezone of a Azure App Service

    That’s it. You have changed the Timezone of the Windows Azure App Service successfully.

    Verify TimeZone

    Now, make sure that the timezone is applied correctly to the Azure app service. Open the app console and check the current date and time of the service. Match the current date and time with the actual time of the configured Timezone.

    How to Configure Timezone of Azure App Service
    Check Current Date and Time in Azure App Service

    Conclusion

    In this tutorial, You have learned to configure the Timezone of a running App Service on the Azure cloud platform. Now all the date and time-related activities will use the new Timezone as default for that Azure App Service.

    Azure Azure App Service timezone
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow To Install NVM on Ubuntu 22.04
    Next Article How To Install Node.js on Ubuntu 22.04

    Related Posts

    How to Set or Change Time Zone in Linux

    Updated:March 26, 20223 Mins Read

    How to Change Time Zone in Debian Linux

    Updated:March 26, 20222 Mins Read

    How to Get Current Date & Time in PHP

    Updated:August 7, 20182 Mins Read

    How to Get or Set default Timezone for PHP Script

    1 Min Read

    How to Setup Timezone in php.ini or PHP Script

    Updated:June 5, 20191 Min Read

    How to Change Timezone on Ubuntu 18.04 & 16.04 LTS

    Updated:August 12, 20191 Min Read

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.