Nov. 8, 2011
5:43 p.m.
Thom Hehl wrote:
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