I would like to have a list of all the timezones in my system's zoneinfo database (note : system is a debian strecth linux)
The current solution I have is : list all paths under /usr/share/zoneinfo/posix
, which are either plain files or symlinks
cd /usr/share/zoneinfo/posix && find * -type f -or -type l | sort
I am not sure, however, that each and every known timezone is mapped to a path under this directory.
Question
Is there a command which gives the complete list of timezones in the system's current zoneinfo database ?
Best Answer
On Debian 9, your command gave me all of the timezones listed here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Additionally,
systemd
providestimedatectl list-timezones
, which outputs a list identical to your command.As far as I know, the data in
tzdata
is provided directly from IANA:So just keep the
tzdata
package updated.