Extension to tzcode to support additional timezones
Christos Zoulas
christos at zoulas.com
Tue Oct 26 17:24:46 UTC 2010
On Oct 26, 9:58am, guy at alum.mit.edu (Guy Harris) wrote:
-- Subject: Re: Extension to tzcode to support additional timezones
| > - void *tzopen(const char *name). This loads the rules for a specified
| > timezone and returns a void * cookie. If the zone cannot be parsed it returns
| > NULL and sets errno to EINVAL.
Why return void *, when you can return an opaque type
that can be typechecked?
| Note that, on several OSes - including, as I remember, FreeBSD
| - "struct tm" includes a "tm_zone" field, which points to the
| timezone abbreviation for the time in question.
The field is an OS extension and for the OS's that really want to
support it we can use a pool of immutable strings to implement
it. I can provide sample code for that.
| People have been suggesting this sort of thing on several occasions,
| so we'd be interested in an API of this sort. (In the past, I'd
| proposed support for this, with a patch, and somebody pointed out
| the tm_zone issue.)
Well I proposed the same change and I provided a patch. I have not heard
any feedback if people like the patch (the names or the arguments or the
way the patch was done) or not.
I have been curious since the early nineties why this has not been done
already (since I needed this 20 years ago in a multi-timezone tranding
system I was writing at the time).
I would like to make progress on this. If people like the patch, I can
implement the zone name pooling code and fix the manual page. I don't
want to spend the time to improve on this if people think that I am
doing things the wrong way or this will never be accepted.
christos
More information about the tz
mailing list