mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 20:32:43 +00:00
dbms: Server: Support for multiple time zones: development [#METR-15618]
This commit is contained in:
parent
17f681ba8c
commit
ec8925aa40
dbms/tests/queries/0_stateless
35
dbms/tests/queries/0_stateless/00189_time_zones.reference
Normal file
35
dbms/tests/queries/0_stateless/00189_time_zones.reference
Normal file
@ -0,0 +1,35 @@
|
||||
2014-12-29
|
||||
2014-12-22
|
||||
2014-12-22
|
||||
2014-12-29
|
||||
2014-12-22
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-12-01
|
||||
2014-07-01
|
||||
2014-07-01
|
||||
2014-07-01
|
||||
2014-10-01
|
||||
2014-07-01
|
||||
1970-01-02 12:00:00 1970-01-02 12:00:00
|
||||
1970-01-02 10:00:00 1970-01-02 11:00:00
|
||||
1970-01-02 09:00:00 1970-01-02 10:00:00
|
||||
1970-01-02 18:00:00 1970-01-02 18:00:00
|
||||
1970-01-02 01:30:00 1970-01-02 01:30:00
|
||||
2015-07-15 13:30:00
|
||||
2015-07-15 12:30:00
|
||||
2015-07-15 11:30:00
|
||||
2015-07-15 19:30:00
|
||||
2015-07-15 02:30:00
|
||||
1426415400
|
||||
1426422600
|
||||
1426426200
|
||||
1426393800
|
||||
1426455000
|
57
dbms/tests/queries/0_stateless/00189_time_zones.sql
Normal file
57
dbms/tests/queries/0_stateless/00189_time_zones.sql
Normal file
@ -0,0 +1,57 @@
|
||||
|
||||
/* toMonday */
|
||||
|
||||
SELECT toMonday(toDateTime('2014-12-29 00:00:00'), 'Europe/Moscow');
|
||||
SELECT toMonday(toDateTime('2014-12-29 00:00:00'), 'Europe/Paris');
|
||||
SELECT toMonday(toDateTime('2014-12-29 00:00:00'), 'Europe/London');
|
||||
SELECT toMonday(toDateTime('2014-12-29 00:00:00'), 'Asia/Tokyo');
|
||||
SELECT toMonday(toDateTime('2014-12-29 00:00:00'), 'Pacific/Pitcairn');
|
||||
|
||||
/* toStartOfMonth */
|
||||
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Europe/Moscow');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Europe/Paris');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Europe/London');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Asia/Tokyo');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Pacific/Pitcairn');
|
||||
|
||||
/* toStartOfQuarter */
|
||||
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Europe/Moscow');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Europe/Paris');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Europe/London');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Asia/Tokyo');
|
||||
SELECT toStartOfMonth(toDateTime('2014-12-29 00:00:00'), 'Pacific/Pitcairn');
|
||||
|
||||
/* toStartOfYear */
|
||||
|
||||
SELECT toStartOfQuarter(toDateTime('2014-09-30 23:50:00'), 'Europe/Moscow');
|
||||
SELECT toStartOfQuarter(toDateTime('2014-09-30 23:50:00'), 'Europe/Paris');
|
||||
SELECT toStartOfQuarter(toDateTime('2014-09-30 23:50:00'), 'Europe/London');
|
||||
SELECT toStartOfQuarter(toDateTime('2014-09-30 23:50:00'), 'Asia/Tokyo');
|
||||
SELECT toStartOfQuarter(toDateTime('2014-09-30 23:50:00'), 'Pacific/Pitcairn');
|
||||
|
||||
/* toTime */
|
||||
|
||||
SELECT toTime(toDateTime('2015-01-01 12:00:00'), 'Europe/Moscow'), toTime(toDateTime('2015-04-06 12:00:00'), 'Europe/Moscow');
|
||||
SELECT toTime(toDateTime('2015-01-01 12:00:00'), 'Europe/Paris'), toTime(toDateTime('2015-04-06 12:00:00'), 'Europe/Paris');
|
||||
SELECT toTime(toDateTime('2015-01-01 12:00:00'), 'Europe/London'), toTime(toDateTime('2015-04-06 12:00:00'), 'Europe/London');
|
||||
SELECT toTime(toDateTime('2015-01-01 12:00:00'), 'Asia/Tokyo'), toTime(toDateTime('2015-04-06 12:00:00'), 'Asia/Tokyo');
|
||||
SELECT toTime(toDateTime('2015-01-01 12:00:00'), 'Pacific/Pitcairn'), toTime(toDateTime('2015-04-06 12:00:00'), 'Pacific/Pitcairn');
|
||||
|
||||
/* toString */
|
||||
|
||||
SELECT toString(toDateTime('2015-07-15 13:30:00'), 'Europe/Moscow');
|
||||
SELECT toString(toDateTime('2015-07-15 13:30:00'), 'Europe/Paris');
|
||||
SELECT toString(toDateTime('2015-07-15 13:30:00'), 'Europe/London');
|
||||
SELECT toString(toDateTime('2015-07-15 13:30:00'), 'Asia/Tokyo');
|
||||
SELECT toString(toDateTime('2015-07-15 13:30:00'), 'Pacific/Pitcairn');
|
||||
|
||||
/* toUnixTimestamp */
|
||||
|
||||
SELECT toUnixTimestamp('2015-03-15 13:30:00', 'Europe/Moscow');
|
||||
SELECT toUnixTimestamp('2015-03-15 13:30:00', 'Europe/Paris');
|
||||
SELECT toUnixTimestamp('2015-03-15 13:30:00', 'Europe/London');
|
||||
SELECT toUnixTimestamp('2015-03-15 13:30:00', 'Asia/Tokyo');
|
||||
SELECT toUnixTimestamp('2015-03-15 13:30:00', 'Pacific/Pitcairn');
|
||||
|
Loading…
Reference in New Issue
Block a user