Skip to content
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

Session times need to be entered in a confusing way when Daylight Saving time starts/ends before the session date #804

Open
enricobattocchi opened this issue Dec 2, 2022 · 0 comments
Labels
[Component] WC-Post-Types Organizers, Speakers, Sessions, Schedule, Sponsors, Volunteers [Type] Bug

Comments

@enricobattocchi
Copy link

enricobattocchi commented Dec 2, 2022

Describe the bug

If you are e.g. in CET timezone and you try to create a session for a date after the start of Daylight saving time, the time you set will be displayed +1 hour in the Sessions overview list and in the schedule.
The opposite (-1 hour) happens if you are e.g. in CEST and you create a session for a date after the end of DST.
This means that you have to set times skewed ±1 hour in the editor to have the right result.

Looks similar to #748, but probably it's not been fixed by the related PR because in this case the timezone changes depending on the date.

To reproduce

Steps to reproduce the behavior:

  1. Set the site to a timezone which uses DST, e.g. Rome
  2. Enter the editor for a session
  3. If you are testing in November to March, set a date in April to October, or viceversa. In other words, make sure there is a DST switch between your date and the session date.
  4. Set the session time to 10:00
  5. Publish the session.
  6. Visit the Sessions overview in the backend, see that the session time is now 11:00 (or 9:00 in the second case)
  7. Visit the Schedule page in the frontend, see that the session time is now 11:00 (or 9:00 in the second case)
  8. Edit the session once more: the time will still be 10:00.

Expected behavior

I would expect to set the actual planned time for the session in the actual timezone of the date of the event, without the need for a calculation to display the right time.

Screenshots
The session in the editor, while editing it on December 2, 2022:
Screenshot 2022-12-02 at 23-34-45 Edit Session “Prova” ‹ WordCamp Torino 2023 — WordPress

The same session in the overview:
Screenshot 2022-12-02 at 23-35-01 Sessions ‹ WordCamp Torino 2023 — WordPress

The same session in the schedule:
Screenshot 2022-12-02 at 23-35-16 Schedule – WordCamp Torino 2023

WordCamp

Experienced both in https://italia.wordcamp.org/2022/ (sessions created in September for a November date) and https://torino.wordcamp.org/2023/ (sessions will be likely created in February for an April date).

System (please complete the following information):

  • Device: Desktop
  • OS: Devuan Linux
  • Browser Firefox
  • Version 107

Security Issues

To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.

@enricobattocchi enricobattocchi changed the title Session times are displayed in a confusing way when Daylight Saving time starts/ends before the session date Dec 2, 2022
@CdrMarks CdrMarks added [Type] Bug [Component] WC-Post-Types Organizers, Speakers, Sessions, Schedule, Sponsors, Volunteers labels Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] WC-Post-Types Organizers, Speakers, Sessions, Schedule, Sponsors, Volunteers [Type] Bug
2 participants