Extension to tzcode to support additional timezones

Paul Eggert eggert at cs.ucla.edu
Tue Oct 26 17:33:34 UTC 2010


Having an extension like this would be nice, but while we're
making the interface reentrant, we should also pass in the
locale as a parameter, for functions like strftime
that need the locale to do their work.  Many operating
systems already have strftime_l and we should extend that.

Also, it would be better to use names that build
on existing conventions, rather than inventing new names.
How about if we use a z suffix for the new functions that
have a time zone parameter?  That would build on the existing
tradition of using _r and _l for similar extensions.  Something
like this:

strftime_lz (for the strftime_l variant that has a time zone parameter)
localtime_rz (for the localtime_r variant that has a time zone parameter)
mktime_z (for the mktime variant that has a time zone parameter)

I agree that it'd be better to have a new opaque type,
struct tz * (say), rather than void *.



More information about the tz mailing list