Re: Dates being returned in the wrong timezone
OK well I've solved this for my purposes by storing all dates in the DB as timestamps, as that means they are stored as UTC and translated to the servers timezone automatically.
I then set the server's timezone for the session to UTC (so the dates are sent to the connector still in UTC) like so:
await session.sql('SET time_zone = '+00:00'').execute();
That way the dates that node receives are in UTC and it automatically converts them to the correct timezone for the server.
Any other clients are unaffected and therefore I can use workbench with the timestamps shown in the correct timezone.
Thanks for all your help.
Subject
Written By
Posted
November 24, 2020 10:58AM
November 24, 2020 11:27AM
November 25, 2020 03:13AM
November 25, 2020 08:50AM
November 25, 2020 09:01AM
November 26, 2020 02:56AM
November 26, 2020 03:27AM
November 26, 2020 03:37AM
November 26, 2020 03:48AM
November 26, 2020 04:02AM
November 26, 2020 03:55AM
November 26, 2020 04:12AM
Re: Dates being returned in the wrong timezone
November 27, 2020 08:37AM
November 26, 2020 03:43AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.