Re-entrant, any-zone mktime()-equivalent?
joeb at fenics.com
Thu Nov 16 15:40:12 UTC 2000
Jonathan Lennox wrote:
>Has anyone ever developed patches for tzcode to support a function that is
>the equivalent of timelocal()/mktime() and timegm() for arbitrary time zones?
We had to do a similar thing for our system for online
FX option pricing. We needed different threads in the server
to be in different timezones.
Our original intention was to port tzcode to NT (yes, our servers
run NT, sigh), then add the patch you are thinking of.
Unfortunately time constraints prohibited us from doing it the
right way, so we just ended up putting some POSIXy wrappers
around the ugly Win32 functions. (You can do what you want
using the Win32 API, but it's not pretty, and clearly un-
portable). So, at least we are no wronger about timezones
than the OS.
It is possible that we will revisit this project, and reimplement
our interfaces using tzcode instead. I will definitely post
patches if this happens.
More information about the tz