Extension to tzcode to support additional timezones

John Baldwin jhb at freebsd.org
Tue Oct 26 17:59:17 UTC 2010

On Tuesday, October 26, 2010 1:33:34 pm Paul Eggert wrote:
> 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 *.

These all sound fine to me.  I am not tied to any specific names.  I mostly
care about not having to maintain this functionality as a local patch.

John Baldwin

More information about the tz mailing list