aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-08-27 14:57:57 +0200
committerFredrik Gustafsson <[email protected]>2012-08-27 14:57:57 +0200
commitc6fc61ffab426cc7b391eb903e7942bda809a230 (patch)
tree27ae3dcefdd676c115c7fb77ac1d87b6891a7c76 /erts/emulator/beam
parent5d2e66f48c9be7e67e38977d8f88f737f60dfc54 (diff)
parent904384397517ded1e9d2e3b1c6fdf16eeb2dab67 (diff)
downloadotp-c6fc61ffab426cc7b391eb903e7942bda809a230.tar.gz
otp-c6fc61ffab426cc7b391eb903e7942bda809a230.tar.bz2
otp-c6fc61ffab426cc7b391eb903e7942bda809a230.zip
Merge branch 'psi/fix-leap-seconds/OTP-10227' into maint
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_time_sup.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_time_sup.c b/erts/emulator/beam/erl_time_sup.c
index e6962a700b..f90daadadc 100644
--- a/erts/emulator/beam/erl_time_sup.c
+++ b/erts/emulator/beam/erl_time_sup.c
@@ -717,6 +717,11 @@ int univ_to_seconds(Sint year, Sint month, Sint day, Sint hour, Sint minute, Sin
return 1;
}
+#if defined(HAVE_TIME2POSIX) && defined(HAVE_DECL_TIME2POSIX) && \
+ !HAVE_DECL_TIME2POSIX
+extern time_t time2posix(time_t);
+#endif
+
int
local_to_univ(Sint *year, Sint *month, Sint *day,
Sint *hour, Sint *minute, Sint *second, int isdst)
@@ -766,6 +771,11 @@ local_to_univ(Sint *year, Sint *month, Sint *day,
return 0;
}
}
+
+#ifdef HAVE_TIME2POSIX
+ the_clock = time2posix(the_clock);
+#endif
+
#ifdef HAVE_GMTIME_R
tm = gmtime_r(&the_clock, &tmbuf);
#else