Support for WEBSITE_TIME_ZONE in Linux consumption
This needs to have a higher priority. The provided workaround, which is scheduling everything in UTC, doesn't work for all scenarios - or I am missing an obvious solution for this.
or example, there is no way to have the function run every 3 hours between 9am-6pm every work day. The translated UTC schedule would be:
0 0 16,19,22,1 * * 1,2,3,4,5
But this will run once Sunday, and miss one run on Friday:
5/17/2020 6:00:00 PM
5/18/2020 9:00:00 AM
5/18/2020 12:00:00 PM
5/18/2020 3:00:00 PM
5/18/2020 6:00:00 PM
5/19/2020 9:00:00 AM
5/19/2020 12:00:00 PM
5/19/2020 3:00:00 PM
5/19/2020 6:00:00 PM
5/20/2020 9:00:00 AM
5/20/2020 12:00:00 PM
5/20/2020 3:00:00 PM
5/20/2020 6:00:00 PM
5/21/2020 9:00:00 AM
5/21/2020 12:00:00 PM
5/21/2020 3:00:00 PM
5/21/2020 6:00:00 PM
5/22/2020 9:00:00 AM
5/22/2020 12:00:00 PM
5/22/2020 3:00:00 PM
@balag0 Is it only for Consumption plan? I see user reported it for Linux Premium or App Service plan also. https://stackoverflow.com/questions/64316818/time-zone-issue-python-function-app-on-azure
Yes, this issue is specific to consumption plans only.
Hi, any updates on it? Looks like I just got this issue.
Hi, got the same problem here. Cant find a solution. Any updates?
@NvHeijningen @rodchenkov yes, this is still a limitation and we don't have an ETA yet. Are you able to workaround this in the meantime?
Some issue here. Set up WEBSITE_TIME_ZONE configuration and still running on UTC tz
@balag0 this has been open since 2019 with no suggested work arounds. @paxos gave an example of which there seems to be no work around. Will this ever be fixed? Please advise.
Thanks for the ping.. I have opened an internal WI for prioritization. Will update here once we have a plan.
In the meantime, one possible (hacky) workaround, set the frequency greater than required timer frequency. Write code in the function code to check time and either do work or silently exit based on the current time in required timezone.
Ex: To run every 3 hours between 9am-6pm every work day
Configure the trigger to fire once an hour every day. In function code, get current time in utc, check if it is time to run the function , then either silently return or run the actual function logic. Understand its not ideal, but this might help unblock while the feature is coming online.
Would love some improvement here, please! I know we've documented the deficiency here, thanks. But this issue still has the opportunity to surprise teams. For instance, say we use consumption in a lower environments and app service in production environments. Using Windows, all is well. Using Linux, then :tada: !
We've got the workaround suggestion from @balag0, but - as mentioned - it's not ideal. It passes a bit of code complexity onto the customers to solve a product inconsistency. Hopefully this gets picked up to work on? Anywhere we can help? Happy to contribute. Not sure where to start, but currently ruminating over this portion of the azure functions host code ...
If it's too far back on the backlog, could we consider some sort of mitigation? Say ... have the host detect when the app is Linux Consumption and the WEBSITE_TIME_ZONE configuration value is set and warn the user? Popup a message in the portal?
@TroyWitthoeft This is a great point. Making a change to display a warning in "Diagnose and solve problems" -> "Configuration and Management" section in the portal if the app is using "WEBSITE_TIME_ZONE " or "TZ" appsettings.
+1 for proper timezones in 2023
+1 for proper timezones in 2023
The suggestion to display a warning in "Diagnose and solve problems" until this is resolved is a good one. I have only just stumbled across the documentation that says "this isn't supported" after 2 days (on and off) of trying to solve this.
+1 for proper timezones in 2024
+1 for proper timezones in 2025