Can I save a timestamp formatted with timezone?

Hey all!

Im trying to pass a date value from the frontend and save it formatted to the user's timezone. For some reason the date value is being saved in the same way no matter which sort of timezone formatting I choose - And I wonder why is this happening

Example:

  1. The user chooses the value of 08-08-2024 09:00 PM

  2. I pass save this value to the database with formatteing timezone as UTC or as America/Los_Angeles and in both ways its being stored exactley as it was recieved from the front: 08-08-2024 09:00 PM

I would expect that when I save it as America/Los_Angeles (UTC -7) it would be saved as 02:00PM

Am I missing anything?

Thanks!

Omer

5 replies