christin
V2EX  ›  问与答

请教一个 sequelize 的问题

  •  
  •   christin · Mar 30, 2022 · 776 views
    This topic created in 1519 days ago, the information mentioned may be changed or developed.

    后端使用 node + mysql , 定义的表中时间格式为 timeastemp, 使用 sequelize create 数据时时间传 "2019-01-01 00:00:00" ,查看数据库时间和传入的相同.但是 update 时 where 中传入时间,SQL 语句中查询条件的时间没有做时区处理,导致匹配不到数据,但是要更新的数据反而做时区处理了.请问是设计如此还是 bug?
    如图

    xYRyzzP

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1137 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 18:02 · PVG 02:02 · LAX 11:02 · JFK 14:02
    ♥ Do have faith in what you're doing.