[erlang-bugs] leap-second-enabled FreeBSD doesn't work right with R12B4 erts/emulator/beam/erl_time_sup.c; correction patch included
Kenji Rikitake
kenji.rikitake@REDACTED
Sun Sep 14 05:12:10 CEST 2008
In the message <cf683a060809132003j724d7ef5m9cbae52f483e3043@REDACTED>
dated Sat, Sep 13, 2008 at 08:03:30PM -0700,
Matthew Dempsky <matthew.dempsky@REDACTED> writes:
> > Should I rather do this using timegm(3) and throw away
> > the rather naive computation algorithm in univ_to_local()?
> > (Note that this is not necessarily portable either)
>
> mktime(3) is defined by POSIX.
mktime() certainly is, but timegm() isn't, AFAIK.
An example implementation in the following URL will not be thread-safe,
due to the usage of getenv() and setenv().
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/timegm.3.html
BTW local_to_univ() in erl_time_sup.c uses mktime(), and I see no
problem with it.
Kenji Rikitake
More information about the erlang-bugs
mailing list