Skip to content

Commit 15a5bef

Browse files
author
Зишан Мирза
committed
[libc] implement localtime
fix: dst
1 parent 4280c13 commit 15a5bef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/src/time/time_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ int64_t update_from_seconds(int64_t total_seconds, struct tm *tm) {
166166
static_cast<int>(remainingSeconds % TimeConstants::SECONDS_PER_MIN);
167167

168168
if (offset == 0) {
169-
tm->tm_isdst = 1;
170-
} else {
171169
tm->tm_isdst = 0;
170+
} else {
171+
tm->tm_isdst = 1;
172172
tm->tm_hour += offset;
173173
}
174174

0 commit comments

Comments
 (0)