4 ms·
The manual page is wrong. The UNIX clock is UTC, so DST transitions aren't a clock change, they're a local time discontinuity. I'm pretty sure the article is w
by runpkins 5y ago
The manual page is wrong. The UNIX clock is UTC, so DST transitions aren't a clock change, they're a local time discontinuity.
I'm pretty sure the article is wrong, too, because it implies that a DST transition won't cause cron jobs to be skipped or run twice. But it looks like the logic in Better-timeskip-handling.patch doesn't account for the possibility that the computer might be rebooted near a DST transition. Reboot immediately after the time falls back and it'll happily run the cron job a second time. The right way to handle this would have been to internally convert the crontab entries to UTC before scheduling them. It's surprising that OpenBSD (the origin of this patch) blundered this - usually they get the details right.
- xyzzyz 5y agoIn what sense Unix clock is UTC? Unix clock is to a first approximation defined as number of second that have passed since a particular fixed point in time. As such, timezone considerations are pretty much immaterial to what Unix clock is. This definition of Unix clock is only mostly correct, due to its treatment of leap seconds, but the way they are treated in Unix clock is not like how they are treated in UTC anyway (some Unix seconds last 2 SI seconds), so in this sense, Unix clock is not UTC either.