$ zdump /usr/share/zoneinfo/Pacific/Auckland [10:20:36]
/usr/share/zoneinfo/Pacific/Auckland Sat Apr 12 21:22:05 2025 NZST
$ zdump -v /usr/share/zoneinfo/Pacific/Auckland |grep 2025 [10:14:29]
/usr/share/zoneinfo/Pacific/Auckland Sat Apr 5 13:59:59 2025 UT = Sun Apr 6 02:59:59 2025 NZDT isdst=1 gmtoff=46800
/usr/share/zoneinfo/Pacific/Auckland Sat Apr 5 14:00:00 2025 UT = Sun Apr 6 02:00:00 2025 NZST isdst=0 gmtoff=43200
/usr/share/zoneinfo/Pacific/Auckland Sat Sep 27 13:59:59 2025 UT = Sun Sep 28 01:59:59 2025 NZST isdst=0 gmtoff=43200
/usr/share/zoneinfo/Pacific/Auckland Sat Sep 27 14:00:00 2025 UT = Sun Sep 28 03:00:00 2025 NZDT isdst=1 gmtoff=46800
That all looks correct.
$ date [10:53:15]
Sat Apr 12 10:53:20 BST 2025
$ sudo ln -sf /usr/share/zoneinfo/Pacific/Auckland /etc/localtime
$ date [21:55:04]
Sat Apr 12 21:55:21 NZST 2025
As does that.
No idea what is going on but New Zealand time works for me.
For extra authenticity I was upside down while testing this
Edit: Actually the environment variable is not being used properly
TZ=NZST date [11:02:00]
Sat Apr 12 10:04:59 NZST 2025
Just link the zoneinfo file to /etc/localtime as above and it will work. (caveat, see below).
I didn't know the environment variable was even a thing?
Edit2: This works with the environment variable:
TZ=:Pacific/Auckland date [11:21:25]
Sat Apr 12 22:21:32 NZST 2025
Edit to end all edits
Been down the rabbit hole with this.
If TZ is invalid, as in NZST, glibc will not then check /etc/localtime, it will use the invalid value and hence default to UTC.
So make sure TZ is unset if using the link. Or at least right.
glibc checks for the environment variable, if there isn't one it reads /etc/localtime.
At least I think so