[tz] Changes in time zone Pacific/Norfolk

Brian Inglis Brian.Inglis at SystematicSw.ab.ca
Sat Oct 26 22:57:44 UTC 2019

On 2019-10-26 13:02, Paul Gilmartin via tz wrote:
> On 2019-10-26, at 11:20:49, Paul Eggert wrote:
>> On 10/24/19 11:14 PM, Nishit Doshi wrote:
>>> Norfolk Islands have implemented the DST schedule of Australia. Please
>>> implement the changes as soon as possible.

>> This change was released in tzdb 2019c on September 11, thanks to a 
>> notification by Kyle Czech on August 13. If you're running the most 
>> recently patched release of Debian, Fedora, etc. then Pacific/Norfolk 
>> should be working for you already. Here's what I see on my laptop running
>> Ubuntu 18.04.3:
>> $ date -u; TZ=Pacific/Norfolk date
>> Sat Oct 26 17:20:05 UTC 2019
>> Sun Oct 27 05:20:05 +12 2019

Whether this is what the poster expects from "the DST schedule of Australia",
and even whether this project is relevant, depends on what system they are
running, who the update org is, how up to date its timezone package is, and
whether the system has been updated recently.

> Would the following be more informative, but perhaps less portable?:
> 1754 $ tail -1 /usr/share/zoneinfo/Pacific/Norfolk
> <+11>-11<+12>,M10.1.0,M4.1.0/3

Maybe a bit less informative, unless you are into obscure codes: POSIX should
have specified week of occurrence and day of week prefixes e.g. M01.W1.D0 and
required at least 4 digit times e.g. /0300; they could even have supported
alternative English month and day of week abbreviations (like Vixie cron since
1993!) and the string "last" instead of week 5 for the last week of the month.

Command alternatives:

	$ TZ=Pacific/Norfolk date -u; TZ=Pacific/Norfolk date
	$ for opt in '-u' ''; do TZ=Pacific/Norfolk date $opt; done
	$ for tz in UTC Pacific/Norfolk; do TZ=$tz date; done

To my mind the canonical command is probably:

	$ zdump -Vc$(date +%Y),$(date -d'next year' +%Y) Pacific/Norfolk
	Pacific/Norfolk  Sat Oct  5 14:59:59 2019 UT = Sun Oct  6 01:59:59 2019 +11
isdst=0 gmtoff=39600
	Pacific/Norfolk  Sat Oct  5 15:00:00 2019 UT = Sun Oct  6 03:00:00 2019 +12
isdst=1 gmtoff=43200

showing that the change took effect Oct 5/6.
This only works for zones observing annual DST.
You need a wider year range where there are only zone offsets: 1970/1980-next.
Use a profile alias or function for the messy bits.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

More information about the tz mailing list