Changelogs: https://github.com/erlang/otp/releases/tag/OTP-25.3.2.16 https://github.com/erlang/otp/releases/tag/OTP-25.3.2.17 https://github.com/erlang/otp/releases/tag/OTP-25.3.2.18 https://github.com/erlang/otp/releases/tag/OTP-25.3.2.19 https://github.com/erlang/otp/releases/tag/OTP-25.3.2.20 https://github.com/erlang/otp/releases/tag/OTP-25.3.2.21 Refresh patches. Pet portclippy. PR: 286332 Approved by: erlang (maintainer, timeout > 3 weeks) Security: CVE-2024-53846 Security: CVE-2025-26618 Security: CVE-2025-30211 Security: CVE-2025-32433 Security: CVE-2025-46712 MFH: 2025Q2
27 lines
1.1 KiB
Erlang
27 lines
1.1 KiB
Erlang
--- lib/stdlib/src/calendar.erl.orig 2025-04-16 13:06:44 UTC
|
|
+++ lib/stdlib/src/calendar.erl
|
|
@@ -297,11 +297,19 @@ local_time_to_universal_time(DateTime, IsDst) ->
|
|
DateTime1 :: datetime1970(),
|
|
DateTime :: datetime1970().
|
|
local_time_to_universal_time_dst(DateTime) ->
|
|
- UtDst = erlang:localtime_to_universaltime(DateTime, true),
|
|
- Ut = erlang:localtime_to_universaltime(DateTime, false),
|
|
%% Reverse check the universal times
|
|
- LtDst = erlang:universaltime_to_localtime(UtDst),
|
|
- Lt = erlang:universaltime_to_localtime(Ut),
|
|
+ {UtDst, LtDst} =
|
|
+ try
|
|
+ UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
|
|
+ {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
|
|
+ catch error:badarg -> {error, error}
|
|
+ end,
|
|
+ {Ut, Lt} =
|
|
+ try
|
|
+ Ut0 = erlang:localtime_to_universaltime(DateTime, false),
|
|
+ {Ut0, erlang:universaltime_to_localtime(Ut0)}
|
|
+ catch error:badarg -> {error, error}
|
|
+ end,
|
|
%% Return the valid universal times
|
|
case {LtDst,Lt} of
|
|
{DateTime,DateTime} when UtDst =/= Ut ->
|