[erlang-patches] Fix support for leap seconds-aware timezones.
Henrik Nord
henrik@REDACTED
Fri Jul 20 14:27:22 CEST 2012
Thank you, I have included this branch in 'pu'
On 07/16/2012 11:59 PM, Piotr Sikora wrote:
> Fix support for leap seconds-aware timezones.
>
> erlang:universaltime_to_localtime is leap seconds-aware (since 2008),
> however erlang:localtime_to_universaltime is not, which gives
> surprising results on systems configured with leap seconds-aware
> timezones:
>
> 1> erlang:universaltime_to_localtime({{2012,1,1},{0,0,0}}).
> {{2012,1,1},{0,0,0}}
> 2> erlang:localtime_to_universaltime({{2012,1,1},{0,0,0}}).
> {{2012,1,1},{0,0,24}}
>
> and completely breaks calendar:local_time_to_universal_time_dst:
>
> 3> calendar:local_time_to_universal_time_dst({{2012,1,1},{0,0,0}}).
> []
>
>
> git fetch git://github.com/PiotrSikora/otp.git fix-leap-seconds
>
> https://github.com/PiotrSikora/otp/compare/fix-leap-seconds
> https://github.com/PiotrSikora/otp/compare/fix-leap-seconds.patch
>
>
> Note: this patch was tested on OpenBSD and it fixes the issue, but it should
> be tested on other operating systems with leap seconds-aware timezones.
> Information on how to enable them on Linux and FreeBSD can be found here:
> http://thedjbway.b0llix.net/clockspeed/leapsecs.html
>
> Best regards,
> Piotr Sikora< piotr.sikora@REDACTED>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
--
/Henrik Nord Erlang/OTP
More information about the erlang-patches
mailing list