Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 796 forks source link

Event Countdown block timezone is unclear and inconsistent #38285

Open anomiex opened 2 weeks ago

anomiex commented 2 weeks ago

Impacted plugin

Jetpack

Quick summary

I tried to add an instance of the Event Countdown block to a post. It was very unclear what timezone it was interpreting the input in, and as far as I can tell it was wrong.

Steps to reproduce

  1. Have your timezone set to America/New York. Not sure if this is your browser, or your blog, or what.
  2. Add an Event Countdown block.
  3. Try to set an event for a specific UTC time a few months in the future, across the next DST change.
  4. Publish, then calculate the time of the target event based on what's shown in the block.

A clear and concise description of what you expected to happen.

Ideally, a clear indication in the picker and in the button exactly what timezone is being used. Even better if I can select the timezone.

What actually happened

No timezone is indicated in the picker or in the button. After entering a time and dismissing the picker, the button shows a time 1 hour off from what was entered.

It appears that the picker interprets the entered time based on the current UTC offset, not the offset that will be in effect on the selected date. The button displays the time using the offset that will be in effect on the selected date, and the block itself displays the countdown to what the button displays.

Impact

All

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple, Atomic, Self-hosted

Logs or notes

No response

anomiex commented 2 weeks ago

@Automattic/lego This looks like something you worked on recently?

Aurorum commented 2 weeks ago

If no choice is offered, I still remain extremely keen to see this block use the site timezone by default (see #14289 for context - that’s also the default behaviour of the Milestone Widget).

arthur791004 commented 2 weeks ago

We just migrated the existing block from ETK to Jetpack. We'll take a look this issue later.