Re: Dates being returned in the wrong timezone
Well the dates are generated from json, but as they all look good in workbench and select now() is also off by an hour I don't think that can be the issue?
I have now tried datetime and timestamp columns and the result is the same.
It seems as though the connector is taking a date from the timestamp column and then converting it to a javascript timestamp integer, as if I use unix_timestamp around the column it gives the correct timestamp.
The same thing happens with select now():
await session.sql(`select now()`).execute(function(row){
const date = row[0]; //Gives 11:53
});
await session.sql('select unix_timestamp(now())').execute(function(row){
const date = new Date(row[0] * 1000); //Gives 10:53 which is the time here in Spain right now
});
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
Re: Dates being returned in the wrong timezone
November 26, 2020 03:55AM
November 26, 2020 04:12AM
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.