Jakub Szlaur
Jakub Szlaur

Reputation: 2132

How to insert timestamp without timezone using Supabase-JS client?

I want to insert current timestamp without timezone to Supabase.

How can this be done?

Upvotes: 5

Views: 8715

Answers (1)

Andrew Smith
Andrew Smith

Reputation: 1841

You can insert the time from javascript by setting

new Date().toISOString();

when doing an insert or update. I want to address the first part of your statement though as the precise time is the time that data hits the server so having NOW() as the default value in Postgres is more accurate than you passing the date over the wire in my opinion.

Upvotes: 8

Related Questions