【发布时间】:2020-11-25 08:58:47
【问题描述】:
我在 ClickHouse 数据库中观察 strage 的东西
当我在 WHERE 条件中指定日期时间时,clichouse 会将我的请求移动一小时。具有 DateTime 类型的每个表都会发生这种情况
我的机器位于莫斯科时区 UTC+3 服务器位于 CET timezome UTC+1 莫斯科没有夏令时,但问题前段时间就出现了 我认为这是因为欧洲按小时移动时间
例如,给我 23:59 到 00:19 之间的记录 datetime 列具有 DateTime 类型
select datetime from ticker_arch
where
datetime <= '2020-11-23 00:10:00' and
datetime >= '2020-11-22 23:59:00'
order by datetime desc
result 给出了 22:59 到 23:10 之间的记录
2020-11-22 23:09:46
2020-11-22 23:09:46
2020-11-22 23:09:46
2020-11-22 23:09:46
当我在 Datagrip 和我的代码 DBContext 中运行查询时会发生这种情况 请推荐
【问题讨论】:
-
列数据类型?
-
@jarlh 日期时间
标签: sql clickhouse