mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Fix "parseDateTimeBestEffort" for strings in RFC-2822 when day of week is Thuesday or Thursday #10082
This commit is contained in:
parent
8cb4dd275a
commit
142087c4f7
@ -371,7 +371,10 @@ ReturnType parseDateTimeBestEffortImpl(
|
||||
{
|
||||
char c = *in.position();
|
||||
|
||||
if (c == ' ' || c == 'T')
|
||||
/// 'T' is a separator between date and time according to ISO 8601.
|
||||
/// But don't skip it if we didn't read the date part yet, because 'T' is also a prefix or 'Tue' and 'Thu'.
|
||||
|
||||
if (c == ' ' || (c == 'T' && year && !has_time))
|
||||
{
|
||||
++in.position();
|
||||
}
|
||||
|
@ -0,0 +1,2 @@
|
||||
2018-08-18 07:22:16
|
||||
2018-08-16 07:22:16
|
@ -0,0 +1,2 @@
|
||||
SELECT toTimeZone(parseDateTimeBestEffort('Thu, 18 Aug 2018 07:22:16 GMT'), 'UTC');
|
||||
SELECT toTimeZone(parseDateTimeBestEffort('Tue, 16 Aug 2018 07:22:16 GMT'), 'UTC');
|
Loading…
Reference in New Issue
Block a user