TimerTrigger with time range is not using UTC
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
I have an issue that seems to suggest that TimerTriggers with time ranges running locally (with `func start`) are ignoring the expected timezone.
This is my code:
```
public static class TestTimer {
[FunctionName("TestTimer")] public static async Task RunAsync([TimerTrigger("*/30 * 19-21 * * *")] TimerInfo myTimer, ILogger log) {
log.LogInformation($"C# Timer trigger function executed at: {DateTime.UtcNow}");
}
}
```
I also added this to `host.json` for additional logging:
```
"logging": {
...
"fileLoggingMode": "always",
"logLevel": {
"Function": "Trace",
"default": "Trace"
}
}
```
Running with `func start` logs this:

Highlighted in yellow are UTC times, green localtime and blue is 'expected UTC time'.
As you can see from the timestamps on the far left, the process ran at 19:44 UTC which is within the time rage of 19-21. But the function scheduler ignores this and instead schedules the next 5 function triggers for 19:00 local time.
Note: I have not overridden WEBSITE_TIME_ZONE so TZ should be UTC. And even if I do explicitly set WEBSITE_TIME_ZONE to 'UTC' or 'GMT Standard Time' this still occurrs.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.