>Synopsis:      time zone name (%Z) changes from 7.6 to 7.7
>Category:      system
>Environment:
        System      : OpenBSD 7.7
        Details     : OpenBSD 7.7-current (GENERIC) #652: Wed May  7
16:21:14 MDT 2025

[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:

        From OpenBSD 7.6 to 7.7-release (and also -current) all
numeric ("-06", "+05", etc) time zone names, as shown by strftime(3)
%Z have changed.  Negative ones became positive and vice versa.
Alphanumeric names ("MDT", "PDT", "UTC", etc) were not affected.

>How-To-Repeat:

        On a 7.6 machine:

$ env TZ=/usr/share/zoneinfo/Pacific/Galapagos date +%Z
-06
$ env TZ=/usr/share/zoneinfo/Indian/Maldives date +%Z
+05

        On a 7.7 machine:

$ env TZ=/usr/share/zoneinfo/Pacific/Galapagos date +%Z
+06
env TZ=/usr/share/zoneinfo/Indian/Maldives date +%Z
-05

A very simple shell script to print all time zone names:

#! /bin/sh

for tzfile in $(find /usr/share/zoneinfo -type f); do
    if file $tzfile | grep -q 'timezone data'; then
        echo -n "$tzfile: "; env TZ=$tzfile date +%Z
    fi
done

>Fix:
        Unknown.  Is this coming from the upstream tz database
        maintainer?

Thanks,
--Kor

Reply via email to