[time-nuts] Unit tests for time calculations
Tom Van Baak
tvb at LeapSecond.com
Thu Jun 13 03:02:33 UTC 2013
> 12/31/1998 00:00:00 EST + 5184001 seconds = Time Date in UTC
> 01/01/1991 11:01 AM EST = XX/XX/XXXX XX:XX UTC
Doug,
This is difficult (or impossible) to do right; at a minimum you need a table of all past, current, and future national timezone definitions, DST rules by locale, and leap seconds. Start by defining your problem very explicitly, down to each character, digit, integer, and allowable range.
I think there is a timezone mailing list that would better be able to answer your question. They may point you to a number of well tested libraries that already do this sort of thing.
/tvb
More information about the Time-nuts_lists.febo.com
mailing list