-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong time after migration from Plone 4 to 5 #265
Comments
Well, that involved the switch from ATContentTypes to plone.app.contenttypes and from DateTime to datetime. So, lots of change. I remember fixing a bug like this long ago in ATEvent. Datetimes need to be rendered using the timezone offset they had on the date that is specified in the datetime value, not the offset on the day they are being rendered. |
It was already dexterity (p.a.contenttypes), if that narrows it down...? |
An old migrated event shows
vs. a new created event
What would a migration step look like and where should it go? |
I'm not sure what change accounts for the difference then. |
p.a.event in Plone 4 used to store the timezone in an extra field while having the datetime itself 'naive' (w/o timezone). This was a bad idea and involved tons of postprocessing when accessing the values. It looks like while migration from 4 to 5 the timezone was dropped and set to UTC. Solution: Write a script that iterates over all events, read start and end, check if timezone is UTC and if so, correct the timezone (and probably the hour) and write back. |
These are the values within the Plone4 site
|
So the time format was still correct, but the displayed time is not correct. @thet ? |
On an Event that was created on Plone 4 before Summertime change, the time on the event was 8:30, on the migrated site the event time is shown as 7:30.
How did the datetime handling change from Plone 4 to 5?
The text was updated successfully, but these errors were encountered: