R
Railway14mo ago
Jokerz

having issues with timezone

i have a simple defaultNow timestamp saving, but the db is giving the timestamp another hour behind? eg. saving data at 17:00 in bst, should be 16:00 in utc, but the db is giving 15:00
18 Replies
Percy
Percy14mo ago
Project ID: 3fad4fec-c497-4ecf-a107-dbd12bc4e047
Jokerz
JokerzOP14mo ago
3fad4fec-c497-4ecf-a107-dbd12bc4e047
Brody
Brody14mo ago
as per standard, the deployments operate on utc time
Jokerz
JokerzOP14mo ago
yeah im pretty baffled
Jokerz
JokerzOP14mo ago
No description
Jokerz
JokerzOP14mo ago
No description
Jokerz
JokerzOP14mo ago
these are the latest items being saved right now which is -2, instead of -1
Brody
Brody14mo ago
-2 from what? is that not a utc timestamp?
Jokerz
JokerzOP14mo ago
it seems to be an hour behind utc utc right now is 16:40 but data is being saved at 15:40
Brody
Brody14mo ago
have you somehow set a different timezone?
Jokerz
JokerzOP14mo ago
Where on the db? Or in the data I’m saving? ok interesting
Jokerz
JokerzOP14mo ago
this is on localhost - correct
No description
Jokerz
JokerzOP14mo ago
this is deployed - incorrect
No description
Jokerz
JokerzOP14mo ago
missing an hour
Brody
Brody14mo ago
no clue what language this is, but instead of being ambiguous, specifically save the time as utc, then when reading the date back from the database convert to the desired time zone for display purposes only
Jokerz
JokerzOP14mo ago
my local nextjs code is showing the correct code, my deployed nextjs code is 1 hour behind which is odd
Brody
Brody14mo ago
specifically save the time as utc
that way no matter what timezone the computer / server uses, it will always be saved in a known timezone
Floris
Floris14mo ago
seems to be some scheme defining language no clue could you not just adjust with -1 hour guys 🪤 doesnt that cheese look yummy brody
Want results from more Discord servers?
Add your server