Giter Club home page Giter Club logo

Comments (3)

lohart13 avatar lohart13 commented on June 13, 2024 1

I've had a quick look into this, and it appears the wording on the website is slightly different to what you are trying to achieve.

  • If the input date string has no time portion (ie 2023-12-28) the value would be stored as 2023-12-28 00:00:00
  • If the input string has a time potion and no timezone information (ie 2023-12-28 02:00:00), the value is converted the local time as then stored in the database as UTC

To have the input string value treated as UTC, you need to have a datetime string with the UTC time zone, for example:

  • 2023-12-28 02:00:00+00:00
  • 2023-12-28 02:00:00Z

from sequelize.

oyejorge avatar oyejorge commented on June 13, 2024

Sorry, does that mean the wording on the website is incorrect or that there's more subtlety to the date datatype?

In Sequelize 6, an input such as 2022-11-06 was parsed as local time... Starting with Sequelize 7, that input is parsed as UTC ...

Is this correct?

2023-12-28 treated as UTC

2023-12-28 02:00:00 not treated as UTC

from sequelize.

WikiRik avatar WikiRik commented on June 13, 2024

Yes, that sounds correct

from sequelize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.