From 15a5bef567cd7535a4ace2dcee0da4bddb97b954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 16:05:42 +0200 Subject: [PATCH] [libc] implement localtime fix: dst --- libc/src/time/time_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/src/time/time_utils.cpp b/libc/src/time/time_utils.cpp index 9a4aacb8f86f85..5cc735734111a7 100644 --- a/libc/src/time/time_utils.cpp +++ b/libc/src/time/time_utils.cpp @@ -166,9 +166,9 @@ int64_t update_from_seconds(int64_t total_seconds, struct tm *tm) { static_cast(remainingSeconds % TimeConstants::SECONDS_PER_MIN); if (offset == 0) { - tm->tm_isdst = 1; - } else { tm->tm_isdst = 0; + } else { + tm->tm_isdst = 1; tm->tm_hour += offset; }