[wp-trac] [WordPress Trac] #51130: Events displayed in venue timezone instead of user's
WordPress Trac
noreply at wordpress.org
Sat Sep 19 13:42:01 UTC 2020
#51130: Events displayed in venue timezone instead of user's
--------------------------------------+------------------------------
Reporter: iandunn | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by iandunn):
That's an interesting idea 🤔
I'd thought about adding it next to the event time, but it felt too
cluttered. Putting it next to the city time would mitigate that. I
uploaded some screenshots above that show examples of those.
It also shows the difference between using the UTC offset, and the
timezone abbreviation. I think I'm leaning towards the timezone
abbreviation, since that's shorter, and would be more familiar for most
people (I'm assuming).
If we go with the timezone abbreviation, then maybe it would be better to
place it next to the event time? That'd be more directly connected to the
time, and more likely to be seen.
There may be some technical challenges getting either of them, though,
though. `Date().getTimezoneOffset()` and `new Date().toLocaleTimeString
('en-us',{timeZoneName:'short'}).split(' ')[2]` have various issues with
browser support. `moment().tz("America/Los_Angeles").zoneAbbr()` might not
be worth the performance hit for the enqueue. I guess we could try the two
native methods, and fallback to an empty string if neither are available?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51130#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list