xmysql
xmysql copied to clipboard
DATETIME timezone TZ format
Dear fellows,
I´m facing trouble with mysql DATETIME format operations.
When I create an object with created_at: new Date(), for example, I get a TZ format "2019-02-07T01:12:26.000Z", however mysql seems not to handle it.
If I simply create a row with xmysql and after get it to update and try to PUT a row update with tables with date time, the issue happens, because of this date format handling.
I know there´s a lot of issue when changing behavior of date handles that may causes a mess with timezones and etc.
Without much knowledge I found that I may add a mysql connection option (dateStrings: true) to trick this issue, however I do not know what kind of impact it may be.
Do anyone have knowledge on that and may share what is the best practice?
Also @o1lab would you add this dateStrings command options for the futures update?
Thanks.
Supposed that DateTime in MySQL formatted as "YYYY-MM-DD HH:ii:ss" if I ain't mistaken?
Hi, i have the same issue. In MySQL db, the datetime column has a value of: 2019-08-31 15:16:13 for example
But when i query it thru xmysql API, i receive : 2019-08-31T13:16:13.000Z.
Is this going to be fixed?
Same Issue is faced by me. MySQl is storing my local date, but xMysql is returning the UTC DateTime for the same date. This is because, MySQL stores date in UTC+offset internally. It seems that the API service is accessing only the UTC part, for the offset for the MySQL session timezone