Hi, I don’t know, if it is an bug, but I hope its my fault an you can help me:
For one of my clients (musician) I made a gigs calendar. It’s a simple a structure field with a date field and a time field as sub-fields.
When he creates a new gig and saves the changes everything looks fine, but when he reloads the panel, the date of the gig is now plus one day (example: he saves 2024-12-31 and after reloading the value changes to 2025-01-01)
When I observe the changes in the txt-content-file, the wrong date ist saved with the initial saving.
can you help me? is it a timezone-problem? in the reference I don’t find an entry that deals with this topic…
i also found the thread you mentioned, but perhaps it’s a new bug?
i also found this issue from summer of this year, perhaps it’s the same bug…
I tried to set the default timezone in index.php like mentioned in the old thread but I doesn’t help.
Today early in the morning (6:00 am) I tested again, and the bug has gone! Crazy! could be a hint that it has to do with a timezone issue.
I enabled time for the date field now and check later if it works as expected…
Okay, it’s getting more and more crazy!!!
Now I changed the blueprint to a date field with time enabled and removed the date format field property. The behavior mentioned in my first post seems to be gone, but now the following happens:
when I enter a date at the end of a year (for example 2024-12-31) everything looks good in the panel, and also the content file is correct, but in the front-end the year is PLUS ONE YEAR (2026)!!!
I use the toDate() method with intl date-handler…
Okay, i tested a little bit more with the actual starter kit and I think I found a bug in the toDate()-method in Combination with intl-datehandler.
It is reproducible:
build a page with structure field and a date field inside
create an entry with a date near the end of a year
output the structure field entries in your template with