new C time interface
D. J. Bernstein
djb at cr.yp.to
Fri Oct 23 22:58:25 UTC 1998
Nathan Myers writes:
> The problem with the mktime model is that conversions between civil
> time and timestamps can result in 2, 1, or <1 valid conversions,
That's true only if you omit the UTC offset.
The basic structure for civil times in libtai is struct caltime, which
includes a calendar date, a time of day, and a UTC offset. caltime_tai()
converts struct caltime to struct tai.
You're asking how to determine the UTC offset when a user types a date
and time. With libtai's time-zone support (under development) you'll be
able to see all the possible UTC offsets in this time zone, and check
for each one whether it's consistent with that date and time.
1000 recipients, 28.8 modem, 10 seconds. http://pobox.com/~djb/qmail/mini.html
More information about the tz