mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-19 15:01:03 +00:00
80d8f4bd60
* add datatypes translate * fixed some left English
17 lines
1008 B
Markdown
17 lines
1008 B
Markdown
# DateTime
|
||
|
||
包含时间和日期。用4个字节来存储 Unix 时间戳(无符号的值)。允许存储的时间范围同 Date 类型。最小的值为 0000-00-00 00:00:00。
|
||
DateTime 类型值精确到秒(不考虑闰秒)
|
||
|
||
## Time zones
|
||
|
||
在客户端或服务器启动时,会使用系统的时区来将时间日期从文本(划分成多个部分)到二进制之间相互转化。在文本格式中,有关夏令时信息不作存储。
|
||
|
||
默认情况下,客户端连接到服务的时候会使用服务端时区。可以通过客户端命令行参数 `--use_client_time_zone` 来设置使用客户端时区。
|
||
|
||
在所有的时区内,只支持部分与UTC相差整数小时(不考虑闰秒)的时区。
|
||
|
||
因此,在处理文本日期时(例如,在保存文本转储时),请记住在夏时制期间可能会出现歧义,如果时区发生变化,可能会出现与数据匹配的问题。
|
||
|
||
[来源文章](https://clickhouse.yandex/docs/en/data_types/datetime/) <!--hide-->
|