mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-10 08:22:00 +00:00
315906b380
Recently I was looking into one dataset, that has such format. So I've changed the meaning of the following formatters for formatDateTime()/parseDateTime(), like in other implementations [1]: - %l/%k - to handle hours without leading zeros - %c - handle months without leading zeros [1]: https://www.php.net/strftime And since this is kind of behaviour change (even though it is unlikely will break something), there is a new setting to control this new behaviour: - parsedatetime_enable_format_without_leading_zeros=1 (default ON) - formatdatetime_enable_format_without_leading_zeros=0 (default OFF, since this could change users output) Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
77 lines
744 B
Plaintext
77 lines
744 B
Plaintext
Tue Tue
|
|
Jan Jan
|
|
01 01
|
|
20 20
|
|
02 02
|
|
01/02/18 01/02/18
|
|
2 2
|
|
000000 000000
|
|
2018-01-02 2018-01-02
|
|
10 12
|
|
22 00
|
|
02
|
|
33 00
|
|
10 12
|
|
11
|
|
12
|
|
001 001
|
|
366 366
|
|
00 00
|
|
01 01
|
|
January January
|
|
33 00
|
|
\n \n
|
|
AM AM
|
|
AM
|
|
PM
|
|
10:33 PM 12:00 AM
|
|
22:33 00:00
|
|
44 00
|
|
\t \t
|
|
22:33:44 00:00:00
|
|
Tuesday Tuesday
|
|
1 7 1 7
|
|
01 01 53 52 01 01 53 52
|
|
1 0 1 0
|
|
18 18
|
|
2018 2018
|
|
% %
|
|
no formatting pattern no formatting pattern
|
|
2018-01-01 00:00:00
|
|
1927-01-01 00:00:00
|
|
2018-01-01 01:00:00 2018-01-01 04:00:00
|
|
+0000
|
|
-1100
|
|
+0300
|
|
+0530
|
|
000000
|
|
000000
|
|
000000
|
|
000000
|
|
123
|
|
123456
|
|
123456789
|
|
0
|
|
0
|
|
0
|
|
0
|
|
123
|
|
123456
|
|
123456789
|
|
2022-12-08 18:11:29.123400000
|
|
2022-12-08 18:11:29.1
|
|
2022-12-08 18:11:29.000000
|
|
2022-12-08 18:11:29.000000
|
|
2022-12-08 00:00:00.000000
|
|
2022-12-08 00:00:00.000000
|
|
01
|
|
01
|
|
02
|
|
02
|
|
02
|
|
1
|
|
01
|
|
2
|
|
2
|
|
02
|