Saturday, July 07, 2012

[goqldqyi] Time zones

Some notes on determining what time it is now in other time zones:

TZ=UTC date
TZ=:America/New_York date
TZ=:America/Chicago date
TZ=:America/Denver date
TZ=:America/Los_Angeles date
TZ=:America/Anchorage date
TZ=:Pacific/Honolulu date

This pattern knows about when it is daylight savings time around the world.  All the known time zones:

find /usr/share/zoneinfo/ -not -type d -not -name '*.tab' | perl -plwe 's,^/usr/share/zoneinfo/,:,'

The colon is optional on GNU.

The text file /usr/share/zoneinfo/zone.tab describes each time zone.

/usr/share/zoneinfo/iso3166.tab are the country codes used in zone.tab

The "right" subdirectory has something to do with leap seconds: "right" tz database (zoneinfo) files and GPS-based NTP

No comments :