Search code examples
azureazure-webjobsazure-app-service-envrmnt

Azure - Change TimeZone for WebJob Details log


Having WebJobs on Azure App Service, trying to sort out the timezone of Continous WebJobs Details. Can anyone guide to change TimeZone in Azure WebJobs output logs. Have tried to add a value on the Application Setting for “WEBSITE_TIME_ZONE” but didnt help us to change the WebJobs logs.


Solution

  • Currently we can not modify the time which used to output the Azure WebJobs logs. It is always in UTC time.

    If we use the WEBSITE_TIME_ZONE setting to change the time zone, it will work in your code, but not for the output log itself.

    For example, I have a webjob which will print current time. And I add an application setting as below

    enter image description here

    China Standard Time=UTC+8. So the output should be like this

    enter image description here

    Reference:

    Set the time zone