0

the problem is that the mysql console shows me the date time as: 2000-01-01 09:10:00 The result in when is: 2000-01-01T08:10:00.000Z global.time_zone and session.time_zone is set to +00:00 and the server is in Germany. This is the Node.js code:

connection.query('select e.date from events as e', function(err, result){        
    res.end(JSON.stringify(result));

When i set the system time to UTC it works fine but it would be better to have a solution that work doesn't care about the systems time_zone. Any help or idea is appreciated :D

T.S
  • 1
  • 2
  • 1
    please see [How do I set the timezone of MySql](https://stackoverflow.com/a/19069310/1118978) – Derviş Kayımbaşıoğlu Dec 23 '18 at 15:33
  • Thanks for the idea : ) , but sadly I've already read and done this my global- and session timezone are already set to +00:00 so the convert_tz method doesn't change any thing. – T.S Dec 26 '18 at 16:17
  • you need to leave your timezone as it is. changing it to UTC would cause much more trouble. – Derviş Kayımbaşıoğlu Dec 26 '18 at 16:18
  • Then ist works, but could you explain why I can't change it to 00? and doesn't mysql expect a time from this time zone(in my case +01)? so if I want to eject a time from another TZ it needs to be conferted to the TZ of the server? – T.S Dec 27 '18 at 12:17

0 Answers0