This commit is contained in:
Raúl Marín 2021-08-02 19:34:53 +02:00
parent 5921f0cc82
commit 367b314df6

View File

@ -473,7 +473,7 @@ public:
}
LUTIndex index = findIndex(t);
UInt32 time = t - lut[index].date;
Time time = t - lut[index].date;
if (time >= lut[index].time_at_offset_change())
time += lut[index].amount_of_offset_change();
@ -493,12 +493,15 @@ public:
/// also make the special timezones with no whole hour offset such as 'Australia/Lord_Howe' been taken into account.
LUTIndex index = findIndex(t);
UInt32 time = t - lut[index].date;
Time time = t - lut[index].date;
if (time >= lut[index].time_at_offset_change())
time += lut[index].amount_of_offset_change();
return time / 60 % 60;
Time res = time / 60 % 60;
if (likely(res >= 0))
return res;
return res + 60;
}
/// NOTE: Assuming timezone offset is a multiple of 15 minutes.