Home > Back-end >  Azure Function (Python) - Set Timezone For Timer Trigger
Azure Function (Python) - Set Timezone For Timer Trigger

Time:07-20

ISSUE

I am trying to setup my UTC CRON job in my Azure Function App to run based on EST/EDT timezone.

My thought is that you enter in your CRON time for your desired timezone, and then via the Azure portal set the configuration option WEBSITE_TIME_ZONE to America/New_York (see image that shows Azure Function is running Linux and not Windows).

enter image description here enter image description here

MORE INFO

According to the below, 08:30 UTC should be 04:30 EDT currently. So that is when I am expecting the monitor to run. It is still running via the CRON job at 08:30 UTC instead of 08:30 Eastern time (04:30 EDT).

enter image description here

Using Python enter image description here

CodePudding user response:

As per July 2022, this is not supported for Linux Function App running on a consumption plan (see documentation):

WEBSITE_TIME_ZONE is not currently supported on the Linux Consumption plan.

CodePudding user response:

According to Microsoft-Documentation it says,

In configuration add app settings WEBSITE_TIME_ZONE and set value to America/New_York

enter image description here

Then save it

enter image description here

WEBSITE_TIME_ZONE is not currently supported on the Linux Consumption plan.

Output:

You get the desired output in Desired Time Zone

enter image description here

Taken References from:

Update: Done in Linux plan only

enter image description here

  • Related