[tz] Barnaby
Zefram
zefram at fysh.org
Tue Nov 8 17:43:42 UTC 2011
Thom Hehl wrote:
>http://code.google.com/p/barnaby
You're using zone.tab as a canonical list of timezones, which it isn't.
zone.tab is only useful for selecting timezones via countries; for a
list of all timezones you can serve you should just look at the tzfiles.
Your usage of time_t is not appropriate. The type you want there is
dictated by the tzfile format, not by libc.
You're doing a linear search (in transitionTimesIndex) that should really
be a binary search.
Overall it looks like you're interpreting (the 32-bit part of) the tzfile
correctly, but I find the code too messy to be sure.
You have some instance methods that should be class methods ("static").
There is much else that is poor about your object model, but that's all
off topic for this list.
-zefram
More information about the tz
mailing list