DateTime for America/City is not store correctly in UTC #5594
-
Description:In Nova, I'm using a DateTime field with my timezone set to America/Mexico_City. However, I noticed that when this field is saved, it's stored in UTC format, but the hour value is not correct. For example, when saving an event with a time of 8:00, I would expect it to be saved as 14:00 in UTC format in the database, considering that the offset for this timezone is 6 hours and it doesn't observe Daylight Saving Time. However, I see that it's being saved with the hour value of 13:00. Consequently, when retrieving the event and transform the UTC date to the Timezone (America/Mexico_City), it displays 7:00 instead of the expected 8:00, as you can see in the attached video. Nova Form Detail displays correctly but if you take the value store (13:00) and you transform with php to the timezone it gets the time incorrently as I mentioned above because should be store as 14:00. I add a repository with an laravel nova example-app with a field call "Start" as a Datetime in the Users Table, just for testing if you need. https://github.com/ronnytorresmtz/example-app You can see in the image what I said about the 8:00 in utc is 14:00 : Detailed steps to reproduce the issue on a fresh Nova installation:I add a repository with an laravel nova example-app with a field call "Start" as a Datetime in the Users Table, just for testing if you need. So you can input in the start field any date with time 8:00 (Amercia/Mexico_City) and you will see in te field UTC Date 13:00 and it is wrong should be 14:00 as you see in the above image. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
Which full date and time that you enter? |
Beta Was this translation helpful? Give feedback.
-
|
example: 2023-05-02 08:00:00
It is what you asked for, I´m not sure
Regards
…On Fri, Jun 2, 2023 at 4:41 PM Mior Muhammad Zaki ***@***.***> wrote:
Which full date and time that you enter?
—
Reply to this email directly, view it on GitHub
<#5588 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF5KBTZLU2S4YNKPAS56PR3XJJTYFANCNFSM6AAAAAAYY3JVUY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
We verified that this issue no longer exists in Laravel Nova 4. However, I do believe the issue exists on Laravel Nova 3 due to moment/moment-timezone#1062 and you need to manually recompile the asset with new version to solve this issue on your application. |
Beta Was this translation helpful? Give feedback.
-
|
Please consider upgrading to the latest version of Nova, as the Orion series of Nova (v1-3) is no longer supported and does not receive updates or bug fixes. |
Beta Was this translation helpful? Give feedback.

Please consider upgrading to the latest version of Nova, as the Orion series of Nova (v1-3) is no longer supported and does not receive updates or bug fixes.