Timezones on Unix

    • There is an extensive time zones database maintained by IANA: tz database
    • Informations about time zones supported by the systems are found in /usr/share/zoneinfo/
      • Read the files with zdump
    • Information about current (local) time zone: /etc/localtime (links to /usr/share/zoneinfo/...)
      • Print information from that file: zdump /etc/localtime
    • For setting the local time zone the environment variable TZ can be used
      • the value of TZ (if present) is appended to /usr/share/zoneinfo/ to point to the time zone file


    • Category

    • Programming

    • Tags

    • Unix
      Linux

    • Created

    • 1. July 2019


    • Modified

    • 17. March 2022