You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DATE returned as raw string if timezone is set (MySQL) #4208
Running the same call with and without a "timezone" setting in data.json give different "testDate". It returns a Date object if "timezone" is not set but it returns a string when it is set.
Right now the date parsing happens in node-mysql which uses native dates, and new Date('2015-07-29 15:22:52 Europe/London') gives Invalid Date. We should take over this parsing and use moment instead
For now you can fix this by using timezone offset instead
Only thing is that timezone offset doesn't handle Daylight Saving Time (BST for London) so we had to change the offset to +01:00 at the beginning to BST and then to +00:00 at the end of it.
Activity
janmeier commentedon Jul 29, 2015
Note to self - fix this in #4186
Right now the date parsing happens in node-mysql which uses native dates, and
new Date('2015-07-29 15:22:52 Europe/London')givesInvalid Date. We should take over this parsing and use moment insteadFor now you can fix this by using timezone offset instead
balintbako commentedon Jul 29, 2015
Thank you for the feedback!
Only thing is that timezone offset doesn't handle Daylight Saving Time (BST for London) so we had to change the offset to +01:00 at the beginning to BST and then to +00:00 at the end of it.
janmeier commentedon Jul 29, 2015
I know, and I very much hope to have that PR merged before the next DST change ;). It was merely offered as a temporary fix
BridgeAR commentedon Jul 29, 2015
@janmeier it would also be nice to support the postgres special values :)
janmeier commentedon Jul 29, 2015
@BridgeAR Postgres can keep those in the DB! If someone wants that kind of magic, they can use moment :)
bug(dates/timezone) Fix parsing of dates in mysql when a named timezo…
realtux commentedon Mar 21, 2016
I use the follow config with
System:and all of my dates are now "Invalid Date".
This appears to be in >= 3.19.3