SQL Server上所有表中的DateTime列已移动几个小时

发布于 2025-01-24 18:03:38 字数 316 浏览 2 评论 0原文

我创建了几张表格,所有这些都有Datatype DateTime的一列。最近,我认为经过日光节省调整后,由于某种原因,所有日期都在几个小时转移了几个小时,即2022-01-01-01 00:00:00'已更改为'2021-12-31 18:00 :00'。

我的猜测是,它与日光节省和与之相关的某些服务器设置有关,但我不知道如何将其恢复。

编辑: 如注释中所建议的,它可能与SQOOP export有关,即我用来将数据从HDFS传输到SQL Server的内容。因此,问题确实是我如何看待桌子中插入的内容。是否有一种方法可以将所有插入语句重定向到日志文件,然后再发送到SQL Server?

I've created a few tables all of which had a column of datatype datetime. Recently, I think after the daylight savings adjustment, for some reason all the dates have shifted by a few hours i.e. '2022-01-01 00:00:00' has changed to '2021-12-31 18:00:00'.

My guess is that it has something to do with the daylight savings and some server setting related to that but I can't figure out how to revert it back.

Edit:
As suggested in the comments, it might have something to do with the sqoop-export i.e. what I'm using to transfer data from hdfs to sql server. So, the question really is how could I look at what is being inserted into the table. Is there a way I can redirect all insert statements to a log file before being sent over to sql server?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文