Skip to content

Sequelize returns timestamps on DATEONLY fields #9468

Closed

Description

@jdownhower

What are you doing?

I am using mssql.

My DATEONLY fields are being stored as YYYY-MM-DD, but when I pull that data down to the client, it is being sent as a full timestamp with time and timezone parts.

I can try to workaround this with a custom get() method for each DATEONLY field, but things like changed() will still detect changes.

What do you expect to happen?

Data from DATEONLY fields to be returned without time (e.g. "2016-02-13")

What is actually happening?

Data from DATEONLY fields is being returned as with timestamp (e.g. "2016-02-13T00:00:00.000Z")

Dialect: mysql
Dialect version: tedious 2.6.2
Database version: MS SQL Server 2017 (14.0.1000.169)
Sequelize version: 4.37.8
Tested with latest release: Yes (If yes, specify that version) 4.37.8

Note : Your issue may be ignored OR closed by maintainers if it's not tested against latest version OR does not follow issue template.

Activity

  1. added
    type: bug
    dialect: mssql
    on May 23, 2018
  2. jdownhower commented on May 23, 2018

    @jdownhower
    Author

    Thank you for the quickly jumping on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dialect: mssqltype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions