Dates are returning incorrectly - less one day

16 views
Skip to first unread message

jeff randall

unread,
Oct 7, 2016, 5:28:25 AM10/7/16
to Sequelize
One of my tables has a field called birthdate with a Data Type of Date but when I try to export the data via an Express app it changes the date to one less than it should be.  For example a birthdate really is 6/20/1978 when I export it becomes 6/19/1978.  Something I noticed I noticed while logging out the data was even though it's a Date only field something (Sequelize?) is adding the time stamps to it so if I don't do any formatting to the date then the date will be correct but not readable for our exports.

When I run the app from my development notebook everything works great but when I push to QA it returns the wrong dates.

If I open PG3Admin from my notebook (which is located in the Pacific timezone) to query the data on the QA/Production server (which is located in Hawaiian timezone) the data looks correct.

I am using Sequelize v3.4.1 connecting to a Postgres 9.3 database.  Also in my Sequelize config file I have set the "timezone": "-10:00" option.
Reply all
Reply to author
Forward
0 new messages