Skip to content

Commit e50b416

Browse files
Fixes bug with Trantor::Date timeZoneOffset calculation (#273)
1 parent fa3b994 commit e50b416

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

trantor/utils/Date.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ class TRANTOR_EXPORT Date
7676

7777
static int64_t timezoneOffset()
7878
{
79-
static int64_t offset =
80-
-Date::fromDbStringLocal("1970-01-01 00:00:00").secondsSinceEpoch();
79+
static int64_t offset = -(
80+
Date::fromDbStringLocal("1970-01-03 00:00:00").secondsSinceEpoch() -
81+
2LL * 3600LL * 24LL * MICRO_SECONDS_PRE_SEC);
8182
return offset;
8283
}
8384

0 commit comments

Comments
 (0)