Skip to content

Commit

Permalink
[libc] implement localtime
Browse files Browse the repository at this point in the history
fix: dst
  • Loading branch information
zimirza committed Sep 28, 2024
1 parent 4280c13 commit 15a5bef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libc/src/time/time_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ int64_t update_from_seconds(int64_t total_seconds, struct tm *tm) {
static_cast<int>(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;
}

Expand Down

0 comments on commit 15a5bef

Please sign in to comment.