Merge pull request #27605 from Enmk/fix_27193_toDateTime64_conversion

Fixed parsing DateTime64 value from string.
This commit is contained in:
Maksim Kita 2021-08-12 13:32:59 +03:00 committed by GitHub
commit 34682c98c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -953,7 +953,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();

View File

@ -0,0 +1 @@
2021-03-21 23:00:00.000

View File

@ -0,0 +1 @@
SELECT toDateTime64('2021-03-22', 3, 'Asia/Tehran');