volto icon indicating copy to clipboard operation
volto copied to clipboard

Listing block shows wrong ending date for events when whole_day is clicked

Open cihanandac opened this issue 1 year ago • 3 comments

Describe the bug In the listing block there is a problem with event dates. If an event has attribute 'whole_day' and if it's "end" value's hour section is 04:00 or above, the listing block shows the end day for the next day of the actual event ending date. When we get inside the event itself it showing the right ending date.

To Reproduce Steps to reproduce the behavior:

  1. Create a listing block and give it a location for the events
  2. Add events with end hour above 04:00
  3. Click the "whole_day" checkbox
  4. Return to the listing page and see that the date is one day later than the actual ending date

Expected behavior I expect it to show the right ending date for the events.

Screenshots After 4:00AM Screenshot 2024-01-31 at 12 28 35 Screenshot 2024-01-31 at 12 27 21

Before 4:00AM Screenshot 2024-01-31 at 12 29 13 Screenshot 2024-01-31 at 12 30 13

Software (please complete the following information):

  • OS: ubuntu
  • Browser [e.g. chrome, safari]
  • Volto Version: 16.20.8
  • Plone Version: 6.0.5
  • Plone REST API Version: 8.39.1

cihanandac avatar Jan 31 '24 11:01 cihanandac

Thanks for the report. I've added this issue to an ever-growing PLIP for event content types. Whole day support of event content types with Volto is definitely broken.

Can you check whether the response from Plone REST API matches what is displayed to the end user? I suspect that our little friend, Moment.js, is mucking about with the display of datetimes here, but would like verification either way.

stevepiercy avatar Jan 31 '24 12:01 stevepiercy

Thanks for your reply @stevepiercy.

I have checked the REST API data that is returned for each item in the Listing Block and the result is the same.

cihanandac avatar Jan 31 '24 12:01 cihanandac

@davisagli same problem we found.

iFlameing avatar Feb 29 '24 08:02 iFlameing