Guys can you help meWhy the timezone is different when I create a data. it far behind 8 hours.
Singaopore server
5 Replies
xenial-black•15mo ago
Are you storing this timestamp in UTC? It's expected to be "behind" by 8 hrs if your timezone is +8 GMT. Run this timestamp under a time function (depends on what language you're using) and get the local time from there to get the "correct" time.
adverse-sapphire•15mo ago
Actually, there is a problem with the timezones.
My app is moving dates in UTC with ISO format. I always store UTC in th DB. I am in CET timezone (+2 from GMT/UTC due to summer time).
On Neon's table explorer, my created_at automatically-filled column is -5h, while it should be -2.
Is there a timezone setting maybe in Neon that I haven't found?
conscious-sapphire•15mo ago
@koslib and @thisjt
Can you share the code with which you're inserting data containing the dates?
adverse-sapphire•15mo ago
Just normal typescript
new Date() kind of thing, I can send you the exact snippet a bit laternoble-gold•15mo ago
Pretty sure this is the same thing I experience, as explained here: https://discord.com/channels/1176467419317940276/1283752616752451594