FW: Test cases for zoneinfo data

yoshito_umaoka at us.ibm.com yoshito_umaoka at us.ibm.com
Thu Dec 16 17:19:53 UTC 2010


"Olson, Arthur David (NIH/NCI) [E]" <olsona at 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 at internode.on.net] 
> Sent: Thursday, December 16, 2010 12:15
> To: tz at 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)



More information about the tz mailing list