aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_time_sup.c
AgeCommit message (Collapse)Author
2010-06-23Teach erl_time_sup to handle timezones w/o DST on FreeBSD as on other platformsPatrik Nyblom
This change handles erlang:localtime_to_universaltime(...,true) in timezones without DST in a consistent way over platforms. Specifically BSD did return an (accurate) -1 from mktime, which blew things up. Now all platforms regard no DST as a DST with delta zero. Linux, SunOS, MacOS etc already did this, why the behaviour on BSD was updated to the slightly incorrect one instead of breaking backward compatibility on most other platforms. Before this change, erlang:localtime_to_universaltime({{2008, 8, 1}, {0, 0, 0}},true) would return {1969, 12, 31}, {23, 59, 59}} when TZ=UTC on FreeBSD, now it mimics the behaviour of other systems and returns {{2008, 8, 1},{0, 0, 0}}. The problem was originally reported by Paul Guyot on erlang-bugs mailing list: http://www.erlang.org/pipermail/erlang-bugs/2008-November/001077.html This correction replaces earlier BSD specific open source patches for this problem.
2010-01-25Merge branch 'ta/os_timestamp_no_mutex' into ccase/r13b04_devErlang/OTP
* ta/os_timestamp_no_mutex: Remove mutex lock around sys_gettimeofday() in os:timestamp/0 OTP-8390 An unecessary lock operation in os:timestamp/0 has been eliminated, making it slightly more efficient. (Thanks to Jonas Falkevik and Tuncer Ayaz.)
2010-01-23Remove mutex lock around sys_gettimeofday() in os:timestamp/0Tuncer Ayaz
In the erlang-questions thread "os:timestamp() uses mutex lock" Jonas Falkevik questioned the need for a mutex lock in os:timestamp/0. The mutex lock *is* needed in erlang:now() to guarantee the uniqueness of the returned time, but serves no useful purpose in os:timestamp(). Signed-off-by: Tuncer Ayaz <[email protected]>
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP