|
|
|
|
|
by Symbiote
3401 days ago
|
|
TZ 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_zonesUsually, /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
|
|
this is not a part of Linux I'm very familiar with