转换时间以便在mysql中使用
我正在尝试将时间戳加载到 mysql 中。我所有的时间都是 UTCTime 对象。 HDBC mysql 实现似乎不喜欢 UTCTime 对象,尽管内部文档说它将所有时间视为 UTC 时间。我相信我需要将 UTCTime 转换为 EpochTime,因为看起来 HDBC mysql 实现支持绑定 SqlEpochTime。我一直无法弄清楚如何获取 UTCTime 并从中获取 EpochTime。
I am trying to load timestamps into mysql. All my times are UTCTime objects. The HDBC mysql implementation does not seem to like UTCTime objects although internally the documentation says that it treats all times as if they were UTC times. I believe that I need to convert UTCTime to EpochTime since it looks like the HDBC mysql implementation supports binding SqlEpochTime. I have not been able to figure out how to take my UTCTime and get an EpochTime out of it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在有一个解决方法:
三周前我向 Chris Waterson(HDBC-mysql 的维护者)发送了一个修复程序,他说他会将其合并到下一个版本中。
Here's a workaround for now:
I sent Chris Waterson (HDBC-mysql's mainainer) a fix 3 weeks ago and he said that he'll incorporate it into the next version.