Problem/Motivation
When someone is editing the all-day event, that event can go back one day in time each time it is edited.
E.G. As a user with Amsterdam time timezone I created an event, and then as a user with New York timezone I'll edit that event, the event date will be converted to New York timezone and that is correct, but after saving the date in the database will be changes to new one and it's wrong, because event go back one day in time.
Steps to reproduce
- Create the
all-day eventas a user withAmsterdam timetimezone - Go edit that event as a user with
New Yorktimezone - Each time when you will edit that event under user with
New Yorktimezone, that event will go back one day in time
Proposed resolution
The data that event is all day is not saved anywhere. So, here's two ways:
- We can add a custom field to the event (field_all_day)
- We can save that data to State API
I decide to go with second one, since this issue is critical and the second way is faster and with second solution we can always move to first one because State API also saves data to the database.
Remaining tasks
Remove all custom logic with 0:01.
User interface changes
No.
API changes
The method social_event_date_is_all_day was changed. New social_event_date_set_all_day method was added.
Data model changes
No.
Comments
Comment #2
rolki commentedMight be related: https://www.drupal.org/project/social/issues/3050756
Comment #3
rolki commentedPlease review my PR to resolve the issue: https://github.com/goalgorilla/open_social/pull/2539
Comment #7
navneet0693 commentedComment #8
navneet0693 commentedThis will be available in Open Social 10.3.2 onwards.