12 ms·
What I meant was: Currently my timezone is CET. In a month's time it will be CEST. If I have to set TZ to explicitly mirror that it will be a burden.
by kseistrup 10y ago
What I meant was: Currently my timezone is CET. In a month's time it will be CEST. If I have to set TZ to explicitly mirror that it will be a burden.
- Symbiote 10y agoTZ may be set like this: TZ=:Europe/Copenhagen Replace Europe/Copenhagen with the appropriate entry from the list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones https://en.wikipedia.org/wiki/List_of_tz_database_time_zones Usually, /etc/localtime is a symlink, as on my laptop: /etc/localtime -> /usr/share/zoneinfo/Europe/Copenhagen so TZ=:/etc/localtime has the same result. You can demonstrate that it takes account of changes to timezones: Normal time for London: $ TZ=:Europe/London date -d '1995-12-30 12:00 UTC' -R Sat, 30 Dec 1995 12:00:00 +0000 British Summer Time: $ TZ=:Europe/London date -d '1995-06-30 12:00 UTC' -R Fri, 30 Jun 1995 13:00:00 +0100 'Double British Summer Time', used for a period during World War 2: $ TZ=:Europe/London date -d '1945-06-30 12:00 UTC' -R Sat, 30 Jun 1945 14:00:00 +0200 Before London's time was standardized to Greenwich: $ TZ=:Europe/London date -d '1845-06-30 12:00 UTC' -R Mon, 30 Jun 1845 11:58:45 -0001