
I'm forwarding this message from Christopher Hunt, who is not on the time zone mailing list. Those of you who are on the list, please direct replies appropriately. --ado -----Original Message----- From: Christopher Hunt [mailto:huntc@internode.on.net] Sent: Thursday, December 16, 2010 12:15 To: tz@lecserver.nci.nih.gov Subject: Test cases for zoneinfo data Hi there, I'm creating a set of Java classes that closely reflect the structure of the Zoneinfo database. My requirement is driven mostly by wanting to dynamically update Java TimeZone classes i.e. as opposed to compiling a zoneinfo data and re-starting my application. In addition I feel that the ICU and Sun classes do not accurately reflect Zoneinfo structures. I shall open-source this project once it gets to a working point. It'd be terribly helpful if I could get hold of some test cases, automated or otherwise, that verify correct time zone calculations. Would anyone out there have such things? Kind regards, Christopher

"Olson, Arthur David (NIH/NCI) [E]" <olsona@dc37a.nci.nih.gov> wrote on 12/16/2010 09:11:50 AM:
I'm forwarding this message from Christopher Hunt, who is not on the time zone mailing list. Those of you who are on the list, please direct replies appropriately.
--ado
-----Original Message----- From: Christopher Hunt [mailto:huntc@internode.on.net] Sent: Thursday, December 16, 2010 12:15 To: tz@lecserver.nci.nih.gov Subject: Test cases for zoneinfo data
Hi there,
I'm creating a set of Java classes that closely reflect the structure of the Zoneinfo database. My requirement is driven mostly by wanting to dynamically update Java TimeZone classes i.e. as opposed to compiling a zoneinfo data and re-starting my application.
You probably want to look into JSR-310. TZDBZoneRulesCompiler in JSR-310 creates ZoneRules from the tz database source files.
In addition I feel that the ICU and Sun classes do not accurately reflect Zoneinfo structures.
Well, ICU (and Sun/Oracle) have to gather daylight saving amount (usually 1 hour, but some exceptions) information because Calendar API expose it. However, zic does not preserve the daylight saving amount information in the output files. Other than daylight saving amount information, ICU (and Sun/Oracle JDK, if my understanding is correct) duplicate the structure logically. ICU also adds some extra aliases for backward compatibility support purpose.
I shall open-source this project once it gets to a working point.
It'd be terribly helpful if I could get hold of some test cases,
automated
or otherwise, that verify correct time zone calculations. Would anyone out there have such things?
In ICU project, we use slightly modified version of zdump and compare the output with the one generated by ICU's TimeZone implementation. You may consider similar method for testing your implementation. Yoshito Umaoka (ICU Project)

Firstly, thanks for the responses. My responses are inline below.
I'm creating a set of Java classes that closely reflect the structure of the Zoneinfo database. My requirement is driven mostly by wanting to dynamically update Java TimeZone classes i.e. as opposed to compiling a zoneinfo data and re-starting my application.
You probably want to look into JSR-310. TZDBZoneRulesCompiler in JSR-310 creates ZoneRules from the tz database source files. Ah - I certainly didn't know about this so thanks for the "heads-up". At first glance though, I don't see that Zoneinfo's structures are being faithfully reproduced here. I suppose another motivation for me was to stick to the Zoneinfo structure given that it is highly evolved and flexible. Please see the attached class diagram of what I'm working to and do feel free to voice your opinion. ZoneinfoTimeZone is a JDK compatible TimeZone facade whereas the rest are intended to represent Zoneinfo structures in an object oriented manner.
In addition I feel that the ICU and Sun classes do not accurately reflect Zoneinfo structures.
Well, ICU (and Sun/Oracle) have to gather daylight saving amount (usually 1 hour, but some exceptions) information because Calendar API expose it. However, zic does not preserve the daylight saving amount information in the output files. Other than daylight saving amount information, ICU (and Sun/Oracle JDK, if my understanding is correct) duplicate the structure logically. ICU also adds some extra aliases for backward compatibility support purpose.
Interesting. My approach is to hydrate the Zoneinfo files into Java objects and then process rules as required.
I shall open-source this project once it gets to a working point.
It'd be terribly helpful if I could get hold of some test cases,
automated
or otherwise, that verify correct time zone calculations. Would anyone out there have such things?
In ICU project, we use slightly modified version of zdump and compare the output with the one generated by ICU's TimeZone implementation. You may consider similar method for testing your implementation.
That's a good idea. Thanks. Kind regards, Christopher

Hi there, Any further advice on this? I noticed it was down too and, while it doesn't effect the ftp site, it is a little disconcerting. After all, zoneinfo is incredibly important! Going forward, do you see that there could be a more appropriate place for the zoneinfo website and its corresponding ftp site to live (even if it is just from a DNS perspective)? Kind regards, Christopher

Following Paul's explanation, I've updated Wikipedia to point to the new page: http://en.wikipedia.org/wiki/Tz_database#External_links Kind regards, Christopher On 03/04/2011, at 1:42 PM, Christopher Hunt wrote:
Hi there,
Any further advice on this? I noticed it was down too and, while it doesn't effect the ftp site, it is a little disconcerting. After all, zoneinfo is incredibly important!
Going forward, do you see that there could be a more appropriate place for the zoneinfo website and its corresponding ftp site to live (even if it is just from a DNS perspective)?
Kind regards, Christopher
participants (3)
-
Christopher Hunt
-
Olson, Arthur David (NIH/NCI) [E]
-
yoshito_umaoka@us.ibm.com