-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
After digging a bit, it seems like there's a different timezone between my script and my database. However, i have try forcing it in the query to convert it to use Asia/Jakarta as timezone, but out of 3 queries, only one returns the same value as the database version (the one that converts it to string, instead of date in javascript) |
Beta Was this translation helpful? Give feedback.
-
Timezones can be tricky sometimes...
You should check for those things, based on your case. There are plenty of examples on the internet to manage those, based on case scenario. |
Beta Was this translation helpful? Give feedback.
It seems like i need to use type assertion on duedate field so it can match current_timestamp. Duedate is timestampz while current_timestamp is timestamp without timezone. As you say, timezones is indeed tricky. Thanks for replying.