Making WordPress.org

Opened 4 years ago

Closed 14 months ago

#5466 closed defect (bug) (fixed)

Change the way time is displayed when it has been converted to local time zone

Reported by: estelaris's profile estelaris Owned by:
Milestone: Priority: normal
Component: WordPress.org Site Keywords:
Cc:

Description

Time zones in Europe and Asia, are marked as UTC, UTC +1, UTC +2, etc or GMT +1, GMT +2, etc.

In WP.org, the time displays as TIME TIMEZONE, as an example: 07:00 PM GMT+2, which could mean one of the two things:

  1. Is it 7:00 PM in the GMT time zone, then add 2 hours to the user's current time, or
  2. Is it 7:00 PM in my current, converted time zone.

Is there a way to display the time in a form that is not ambiguous, like 7:00 PM (GMT+2) so the user understands that the time has already been converted to their local time zone?

Attachments (2)

time displayed with time zone.png (148.5 KB) - added by estelaris 4 years ago.
@Otto42 in most blog pages in core, but here is one specific that can illustrate the issue: https://make.wordpress.org/core/2020/09/01/bug-scrub-schedule-for-5-6/. The issue shows both in the sidebar and the blog content.
times.png (68.8 KB) - added by Otto42 4 years ago.

Download all attachments as: .zip

Change History (8)

#1 @Otto42
4 years ago

Where are you seeing these times being displayed in this manner?

@estelaris
4 years ago

@Otto42 in most blog pages in core, but here is one specific that can illustrate the issue: https://make.wordpress.org/core/2020/09/01/bug-scrub-schedule-for-5-6/. The issue shows both in the sidebar and the blog content.

#2 @Otto42
4 years ago

Yeah, that's not what everybody sees.

Those time displays are actually created by a bit of javascript code which has your browser convert them to your own local time.

If you examine the attachment I added, you'll note that it says CDT for me. And the times are in my local time.

The timezone it is displaying actually comes from your browser settings, not from the server.

@Otto42
4 years ago

#3 @Otto42
4 years ago

Would simply adding parenths around the timezone make more sense for all cases? Because that's not a standard format I've ever seen before, the standard is usually simply to specify the timezone after the time. But then most timezones are named, so seeing GMT+2 is not the usual case.

Edit: Note that with the current implementation, there's no easy way to do this. The time is formatted by the browser using the Date.prototype.toLocaleTimeString() function.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString

All that the w.org code is doing is to figure out the actual time, pass it along to that function, and then tell the browser to display it in the browser's own default language. The formatting and such is thus entirely browser dependent.

Last edited 4 years ago by Otto42 (previous) (diff)

#4 follow-up: @oglekler
15 months ago

Hi! I have a related issue.
https://make.wordpress.org/meetings/#polyglots - Here we don't have a timezone at all.

Why this is a problem: I keep forgetting that it isn't UTC and missing meetings I planned to attend. Right now I am 1.5 hours late but thought that I have 1.5 hours until the meeting. And before this I had some lag in my computer time and my zone was taken wrongly by script and I had even more confusion. And I can be not the only one who has problems with timezones continuously.

#5 in reply to: ↑ 4 @dd32
15 months ago

Replying to oglekler:

Hi! I have a related issue.
https://make.wordpress.org/meetings/#polyglots - Here we don't have a timezone at all.

All times are presented in the users/browsers local timezone.

The timezone isn't explicitly shown on the month "overview", if you click into an item on the Month overview, the date is shown with the Timezone specifier included, and a mouse-over reveals the UTC time.

The timezone is shown explicitly on the List overview.

#6 @estelaris
14 months ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.