V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
ye22st
V2EX  ›  问与答

如果有国际化需求,时区因素原因,那么 MySQL 时间格式是存储时间戳还是 datetime?

  •  
  •   ye22st · 2020-11-05 09:45:20 +08:00 · 708 次点击
    这是一个创建于 1326 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,希望各位大佬能给个建议。

    还是说,数据库就存 DateTime 格式的时间,至于 PC 和 APP 端时间的显示,根据服务器时间去转换成对应时区的时间?

    cheng6563
        1
    cheng6563  
       2020-11-05 11:05:34 +08:00
    时间戳吧
    uselessVisitor
        2
    uselessVisitor  
       2020-11-05 20:16:25 +08:00 via Android
    时间戳
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2419 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 03:02 · PVG 11:02 · LAX 20:02 · JFK 23:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.