[GH-ISSUE #278] The "UTC / Local Time" switcher is confusing #210

Closed
opened 2026-02-25 23:41:36 +03:00 by kerem · 5 comments
Owner

Originally created by @Cheezzhead on GitHub (Aug 21, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/278

I'm not sure if this is legitimately a bug or if I'm misunderstanding the cron scheduling feature, but either way it's not behaving like I expected and I don't really know why.

I have a job running at 5AM every morning (0 5 * * *). The job sends pings to my Healthchecks docker to measure execution time. Everything goes as expected until 3 hours later, when at 8 AM Healthchecks decides the job is down and sends an e-mail alert. The Healthchecks schedule is configured to the same cron schedule (0 5 * * *) with a grace period of 1 hour. I can't for the life of me understand why it suddenly thinks there's a failure at 8 AM.

To summarize:

Healthchecks schedule:
Cron Expression: 0 5 * * *
Time Zone: UTC
Grace Time: 1 Hour

Healthchecks Log:
Aug 21 | 08:00 | Sent email alert to admin@xxx.xx
#25 | Aug 21 | 05:09 | OK | 9 min 57 sec HTTPS GET from xxx.xxx.xxx.xxx- curl/7.58.0
#24 | Aug 21 | 05:00 | Started | HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0
Aug 20 | 08:00 | Sent email alert to admin@xxx.xx
#23 | Aug 20 | 05:09 | OK | 9 min 9 sec HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0
#22 | Aug 20 | 05:00 | Started | HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0
(repeating, of course...)

I've made sure to check if there are no issues with timezones, but none as far as I can see. Both the Healthchecks container and the guest OS report the same UTC timezone, and the log times also match up with the log entries of the job itself.

Originally created by @Cheezzhead on GitHub (Aug 21, 2019). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/278 I'm not sure if this is legitimately a bug or if I'm misunderstanding the cron scheduling feature, but either way it's not behaving like I expected and I don't really know why. I have a job running at 5AM every morning (0 5 * * *). The job sends pings to my Healthchecks docker to measure execution time. Everything goes as expected until 3 hours later, when at 8 AM Healthchecks decides the job is down and sends an e-mail alert. The Healthchecks schedule is configured to the same cron schedule (0 5 * * *) with a grace period of 1 hour. I can't for the life of me understand why it suddenly thinks there's a failure at 8 AM. To summarize: **Healthchecks schedule:** `Cron Expression: 0 5 * * *` `Time Zone: UTC` `Grace Time: 1 Hour` **Healthchecks Log:** `Aug 21 | 08:00 | Sent email alert to admin@xxx.xx` `#25 | Aug 21 | 05:09 | OK | 9 min 57 sec HTTPS GET from xxx.xxx.xxx.xxx- curl/7.58.0` `#24 | Aug 21 | 05:00 | Started | HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0` `Aug 20 | 08:00 | Sent email alert to admin@xxx.xx` `#23 | Aug 20 | 05:09 | OK | 9 min 9 sec HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0` `#22 | Aug 20 | 05:00 | Started | HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0` `(repeating, of course...)` I've made sure to check if there are no issues with timezones, but none as far as I can see. Both the Healthchecks container and the guest OS report the same UTC timezone, and the log times also match up with the log entries of the job itself.
kerem closed this issue 2026-02-25 23:41:36 +03:00
Author
Owner

@cuu508 commented on GitHub (Aug 21, 2019):

One quick thing to check – in the check details page, at the top right of the log there is a [UTC | Local Time] switcher. Do the received ping timestamps look correct when it's switched to UTC?

<!-- gh-comment-id:523439250 --> @cuu508 commented on GitHub (Aug 21, 2019): One quick thing to check – in the check details page, at the top right of the log there is a [UTC | Local Time] switcher. Do the received ping timestamps look correct when it's switched to UTC?
Author
Owner

@Cheezzhead commented on GitHub (Aug 21, 2019):

When I switch to local time, everything shifts back 2 hours. So the pings come in at ~3 AM, then at 6AM the alerts are sent. That makes sense I guess, as 6AM is when the grace period ends.

...It seems I confused UTC with CEST and mistakenly assumed that the UTC Time Zone was the correct local time. Whooops

<!-- gh-comment-id:523450617 --> @Cheezzhead commented on GitHub (Aug 21, 2019): When I switch to local time, everything shifts back 2 hours. So the pings come in at ~3 AM, then at 6AM the alerts are sent. That makes sense I guess, as 6AM is when the grace period ends. ...It seems I confused UTC with CEST and mistakenly assumed that the UTC Time Zone was the correct local time. Whooops
Author
Owner

@cuu508 commented on GitHub (Aug 21, 2019):

The [UTC | Local Time] switcher seems to be a relatively regular source of confusion:

  • It is easy to miss
  • Even if you don't miss it, it is not clear if "Local time" is the configured timezone for the check, or is it the local timezone of your browser

I'll reopen this and will try changing how the switcher works. Let's say my configured timezone for the check is "Europe/Riga". Instead of showing these options:

[ UTC | Local Time ]

I will change it to:

[ UTC | Europe/Riga ]

If check's configured timezone is UTC, then the switcher can be hidden altogether.

<!-- gh-comment-id:523455511 --> @cuu508 commented on GitHub (Aug 21, 2019): The [UTC | Local Time] switcher seems to be a relatively regular source of confusion: * It is easy to miss * Even if you don't miss it, it is not clear if "Local time" is the configured timezone for the check, or is it the local timezone of your browser I'll reopen this and will try changing how the switcher works. Let's say my configured timezone for the check is "Europe/Riga". Instead of showing these options: [ UTC | Local Time ] I will change it to: [ UTC | Europe/Riga ] If check's configured timezone is UTC, then the switcher can be hidden altogether.
Author
Owner

@cuu508 commented on GitHub (Aug 21, 2019):

Here's my current idea:

  • rename "Local Time" to "Browser's time zone" (hopefully clarifies what "local time" is)
  • for checks with cron schedule and non-UTC timezone, add the third option, the server's timezone (Europe/Paris in this example):

image

@Cheezzhead any thoughts? Do you think this would have helped you diagnose the issue?

<!-- gh-comment-id:523618952 --> @cuu508 commented on GitHub (Aug 21, 2019): Here's my current idea: * rename "Local Time" to "Browser's time zone" (hopefully clarifies what "local time" is) * for checks with cron schedule and non-UTC timezone, add the third option, the server's timezone (Europe/Paris in this example): ![image](https://user-images.githubusercontent.com/661859/63462684-218a5b80-c464-11e9-81e5-eb61fb2f1525.png) @Cheezzhead any thoughts? Do you think this would have helped you diagnose the issue?
Author
Owner

@Cheezzhead commented on GitHub (Aug 22, 2019):

That would be a big improvement, yeah. Probably would've helped me solve this issue specifically as I would've seen the difference between the server's timezone and UTC sooner.

Although I should reiterate that the problem was mostly on my side, because in my haste I mixed up UTC and CEST :>

<!-- gh-comment-id:523838251 --> @Cheezzhead commented on GitHub (Aug 22, 2019): That would be a big improvement, yeah. Probably would've helped me solve this issue specifically as I would've seen the difference between the server's timezone and UTC sooner. Although I should reiterate that the problem was mostly on my side, because in my haste I mixed up UTC and CEST :>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#210
No description provided.