And the result I get when I bind the data in my item card is 08:00 am to 09:30am.
It seems like weweb automatically add +2hours.
Do you know a solution to display the corresponding hour depending the browser timezone of the user ?
For info, my data flow is : form up weweb with start date+time and end date+time in weweb that create a record on supabase from which I bind the data in my card.
Donât use the Supabase timestamp() automatic function on your columns. Always use wewebâs now() or something similar from the Date Plugin. You can manipulate time zones there, and everything.
So basically my suggestion is, use frontend made time (WeWeb), not backend made time (Supabase), as the server in Supabase might not be in the same time zone I think?
Your time zone is, I bet CEST. Thatâs 2 hours ahead of GMT. WHen you look at that 6:00 to 7:30, note the +00 at the end - that means the time in supabase is stored in GMT. I bet youâre submitting something like â6:00 amâ and then supabase is translating that naively as if you meant 6am in Greenwich, England, rather than where you are.
Reasonable approaches are make sure the form you send is time zone aware, or you do a manipulation on the backend to insert the timestamp. The former is the best solution, because the browser is aware of the userâs time zone so you donât have to worry about conventions, user data entry or anything like that. This client-side trick is how, say, Google Calendar knows to update times for your meetings when you travel east-west.
If the data in supabase is âtrueâ, everything else becomes easier. The most straightforward test fo whatever solution you apply is to look at the database view after you implement a change you want to try. You want the data in supabase to show either 6:00:00+0200, or 4:00:00+00. These mean the same thing.
Time zones blow up everyone! This can feel frustrating, so patience carries the day. Take your time (har), and let us know how it works out for you!
My first idea was to put at the end of the concatenation a formula to calculate and input the browser timezone, but unfortunately I tried a lot of things from the date plugin but I miss some logic basics.
Thanks again for your time, and yes time zones just burnt my brain
Instead of getBrowserTimezone() you can also specify a defined timezone as a string so the same timezone is enforced for everyone even if they are not in the same one.