I have a C# console App job set as a Azure WebJob. This honors UTC time zone for the trigger and runtime. I have updated the Server Application Config to "Eastern Standard Time" as in the picture.
The Webjob still does not honor the EST time zone. I can see there is a disconnect between the Web App server and the Webjob service as hosts. I wanted to ask if there is a non-code change way to fix this, so that DateTime.Now = EST and Not UTC. I can fix it in the code but try to find a way to fix this in a non-coding way.
NOTE: OS is Windows
By default, the Azure App service
displays UTC
.
Thanks @Thomas for the Comment.
We can see the timezone in Debug Console
=>Powershell
with timezone
.
Visual Studio
, I have created a sample Console App
.My Program.cs
:
Console.WriteLine("Hello, World!");
DateTime dt = DateTime.Now;
Console.WriteLine("The current time is: " + dt.ToString());
Azure App Service
in Azure Portal and create a new Web Job.****\bin\Debug\net6.0
.I have set the WEBSITE_TIME_ZONE
values to Eastern Standard Time
same as you have shown.
Debug Console
=>Powershell
with timezone
.