I have passed the result of Date.now()
and other plain Unix timestamp values like 1534360109480
into SQL and ran them through this:
"@converted_date" = to_timestamp("@date") AT TIME ZONE 'UTC';
And it consistently returns 50591-11-28 22:32:38
.
I do not understand how the year could possibly be 50591 and the date/time is not accurate beyond that anyways.
What am I doing wrong?
@date
...now()
intoto_timestamp()
Date.now()
" or "a unix timestamp" are no specific values and leave a lot of room for interpretation. E.g. I supposeDate.now()
refers to any OO language, but which? Please show actual values as the database sees them or at least elaborate on how and in which environment you pass the values, so that people familiar with that environment may deduce the values, that reach the DBMS.1534360109480
to be converted to something like2018-08-15 18:20:30
in UTC