From 303c389b368598a57ef85ccca1930533fd8a5c13 Mon Sep 17 00:00:00 2001 From: keenwolf Date: Sun, 28 Feb 2021 18:11:54 +0800 Subject: [PATCH] change the time_t to unsigned to handle properly the start date of 1970-01-01 --- base/common/DateLUTImpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/common/DateLUTImpl.h b/base/common/DateLUTImpl.h index 8991f69d3f3..471169ebcec 100644 --- a/base/common/DateLUTImpl.h +++ b/base/common/DateLUTImpl.h @@ -320,7 +320,7 @@ public: /// To consider the DST changing situation within this day. /// also make the special timezones with no whole hour offset such as 'Australia/Lord_Howe' been taken into account DayNum index = findIndex(t); - time_t res = t - lut[index].date; + UInt32 res = t - lut[index].date; if (lut[index].amount_of_offset_change != 0 && t >= lut[index].date + lut[index].time_at_offset_change) res += lut[index].amount_of_offset_change;