Versions Used
Kaffy: 0.9.4
Phoenix: 1.7.0
Elixir: 1.14.3
What's actually happening?
I have a field in the database called start_date with :utc_datetime type. When I want to create a new entity from the Kaffy's dashboard I select the datetime and it sends to the backend "2023-04-21 19:00:00" which is ok. I want that to reflect "2023-04-21 19:00:00" in utc. It ends storing "2023-04-21 19:00:00Z" in the DB. Which is the expected result.
If now I want to edit it (on Kaffy's dashboard) it shows the datepicker with the value "2023-04-21 13:00:00" which is wrong, that value is the "2023-04-21 19:00:00" UTC but in my current timezone, so if I click save it will send "2023-04-21 13:00:00" to the backend ending with "2023-04-21 13:00:00Z" stored on the DB. Which is wrong.
What should happen instead?
The datepicker must show the exact value from the DB, not converting it to my local timezone.
Versions Used Kaffy: 0.9.4 Phoenix: 1.7.0 Elixir: 1.14.3
What's actually happening?
I have a field in the database called
start_date
with:utc_datetime
type. When I want to create a new entity from the Kaffy's dashboard I select the datetime and it sends to the backend"2023-04-21 19:00:00"
which is ok. I want that to reflect "2023-04-21 19:00:00" in utc. It ends storing "2023-04-21 19:00:00Z" in the DB. Which is the expected result.If now I want to edit it (on Kaffy's dashboard) it shows the datepicker with the value "2023-04-21 13:00:00" which is wrong, that value is the "2023-04-21 19:00:00" UTC but in my current timezone, so if I click save it will send "2023-04-21 13:00:00" to the backend ending with "2023-04-21 13:00:00Z" stored on the DB. Which is wrong.
What should happen instead?
The datepicker must show the exact value from the DB, not converting it to my local timezone.