Next.js Discord

Discord Forum

Datetime is wrong when adding through website hosted on vercel

Unanswered
Hamodi posted this in #help-forum
Open in Discord
Datetime is wrong when adding through website hosted on vercel, but when adding on localhost it is correct.

Adding datetime on localhost to Supabase table:
startTime = 2023-10-12T17:00:00.000Z
endTime = 2023-10-12T17:30:00.000Z

Adding datetime on website to Supabase table:
startTime = 2023-10-12T19:00:00.000Z
endTime = 2023-10-12T19:30:00.000Z

4 Replies

European sprat
Because the timezone on your system vs the Vercel host is different
European sprat
I'm not entirely sure where the discrepancy for you would be happening. It looks like supabase by default uses UTC
@European sprat I'm not entirely sure where the discrepancy for you would be happening. It looks like supabase by default uses UTC
Yes, I have checked the Supabase db and it uses UTC. But what does Vercel use?