mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
Fixed parsing DateTime64 value from string.
The time offset undeflowed on positive values.
This commit is contained in:
parent
3f7b96e15b
commit
bdc4d9fe75
@ -955,7 +955,7 @@ public:
|
||||
inline Time makeDateTime(Int16 year, UInt8 month, UInt8 day_of_month, UInt8 hour, UInt8 minute, UInt8 second) const
|
||||
{
|
||||
size_t index = makeLUTIndex(year, month, day_of_month);
|
||||
UInt32 time_offset = hour * 3600 + minute * 60 + second;
|
||||
Time time_offset = hour * 3600 + minute * 60 + second;
|
||||
|
||||
if (time_offset >= lut[index].time_at_offset_change())
|
||||
time_offset -= lut[index].amount_of_offset_change();
|
||||
|
@ -0,0 +1 @@
|
||||
2021-03-21 23:00:00.000
|
@ -0,0 +1 @@
|
||||
SELECT toDateTime64('2021-03-22', 3, 'Asia/Tehran');
|
Loading…
Reference in New Issue
Block a user