[tz] How to compute the moment of the next DST change

Petr Machata pmachata at redhat.com
Tue Apr 2 10:03:20 UTC 2013

Simon Perreault <simon.perreault at viagenie.ca> writes:

> I want to write a cron job or similar that activates one week prior to
> daylight saving time changes. (Or, more generically, one week prior to
> any time jumps, for any reason, DST or else.)

If parsing zdump output is appropriate, that would do the trick.  If you
care about leap seconds as well, that may or may not be available
depending on the system.  On Red Hat systems, leap-second-aware zone
files are stored in /usr/share/zoneinfo/right.


More information about the tz mailing list