I've duplicated the problem. Real fixing involves zic.c (to change the output produced for Macquarie) and to localtime.c (to correctly handle existing binary files). A workaround is to change the Macquarie line that reads... 10:00 Aus EST 1919 Apr ...to read... 10:00 Aus EST 1919 Apr 1 0:00s ...and this change should probably be made to australasia for the benefit of folks who pick up the data files but not the code files. (There might also be a comment about it being a workaround.) --ado On Wed, May 22, 2013 at 10:21 PM, Alan Gutierrez <alan@prettyrobots.com>wrote:
I'm compiling the TZ database using the using the `zic` from the source distributed with the database checked out from GitHub. I'm using the commit that relates to the `tz2013c` release. I'm not able to get an Australian EST timezone offset for dates before October 1916 for Antarctica/Macquarie.
I'm using both Ruby 1.9.3p392 and GNU date 8.15.
When I compile the TZ database at commit 188b29d966; "Fix times of habitation for Macquarie to agree with Tasmania history" I get the unhabited offset and abbreviation.
% TZ="$PWD/build/zoneinfo/**Antarctica/Macquarie" date -d "1916/09/30 16:00 UTC" Sun Oct 1 03:00:00 EST 1916 % TZ="$PWD/build/zoneinfo/**Antarctica/Macquarie" date -d "1916/09/30 15:59 UTC" Sat Sep 30 15:59:00 zzz 1916
When I compile the TZ database at commit a676f5ad3b; "Macquarie Island is politically part of Australia, not Antarctica" I get the correct offset and abbreviation.
% TZ="$PWD/build/zoneinfo/**Antarctica/Macquarie" date -d "1916/09/30 16:00 UTC" Sun Oct 1 03:00:00 EST 1916 % TZ="$PWD/build/zoneinfo/**Antarctica/Macquarie" date -d "1916/09/30 15:59 UTC" Sun Oct 1 01:59:00 EST 1916
Using this commit, if I change the date of the first line of the Zone from "1899 Nov" back to "1911", it starts to work again. Here is the change set that causes the confusion.
https://github.com/eggert/tz/**commit/**188b29d9664cfcf0384e515c69f94a** 2dfc27c673<https://github.com/eggert/tz/commit/188b29d9664cfcf0384e515c69f94a2dfc27c673>
I am on a 32-bit system but in my experience, I'm always able to get a correct timezone offset for dates in 1916 regardless of whether or not the zone begins before the range of a 32-bit POSIX time.
-- Alan Gutierrez ~ @bigeasy