. "$BST_LIB" # tzdata is data only -- the zic-compiled IANA zoneinfo database plus the # /etc/localtime + /etc/timezone default (Universal); no binary to `require`. # glibc reads the TZif files for TZ/localtime conversion, so `date` under an # explicit TZ proves the database end-to-end. # The zoneinfo tree is installed, with the zone index table. check tzdata/zoneinfo-dir test -d /usr/share/zoneinfo check tzdata/zone-tab test -f /usr/share/zoneinfo/zone.tab # The compiled UTC zone carries the TZif magic. check_out tzdata/utc-tzif "TZif" head -c 4 /usr/share/zoneinfo/UTC # The default timezone config: /etc/timezone names Universal and /etc/localtime # resolves to a compiled TZif file. check_out tzdata/etc-timezone "Universal" cat /etc/timezone check_out tzdata/localtime-tzif "TZif" head -c 4 /etc/localtime # Functional: glibc resolves named zones from the database (Tokyo is UTC+9 with # no DST -- deterministic year-round). check_eq tzdata/tokyo-offset "+0900" "$(TZ=Asia/Tokyo date +%z)" check_eq tzdata/utc-offset "+0000" "$(TZ=UTC date +%z)" # The database is substantially present (main + posix + right trees). n=$(find /usr/share/zoneinfo -type f | wc -l) if [ "$n" -ge 1000 ]; then bst_ok tzdata/count else bst_notok tzdata/count "only $n files under /usr/share/zoneinfo"; fi