We have time zone objects in our code that we fill from a time zone file that we maintain manually. This is silly because there is a nice one (Olson's) that already exists on Linux and in glibc so it should be readily available to our compiler.
What I'm trying to do is parse through the time zone database to fill our time zone structures. I'm having trouble figuring out the best way to do this. I don't really want to parse the entire file and match all the current rules to the current time zone definitions etc. I only care about the current rules. I assume there is a better way to do this than starting from scratch with the tz database text files. I'm trying to produce something like this for all of them:
Zone name offset DST? dst_mo dst_day dst_hr std_mo std_day std_hr
UTC 0:00 0
America/New_York -5:00 1 3 Sun>=8 2 11 Sun>=1 2
Europe/Paris +1:00 1 3 lastSun 1 10 lastSun 1
Isn't there some good way to call into time.h or something to get this? I can't seem to find one.