[wp-trac] [WordPress Trac] #10660: Time zone suggester based on nascent WordPress.org API call
WordPress Trac
noreply at wordpress.org
Mon Jun 13 05:09:22 UTC 2016
#10660: Time zone suggester based on nascent WordPress.org API call
--------------------------------------+-----------------------------
Reporter: sambauers | Owner: rmccue
Type: feature request | Status: assigned
Priority: normal | Milestone: Future Release
Component: Date/Time | Version: 2.8.4
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback | Focuses:
--------------------------------------+-----------------------------
Comment (by rmccue):
I implemented timezone detection via the browser for a project I was
working on. Unfortunately, the browser doesn't report the Olsen timezone
via JS, only the [https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset
timezone offset]. There's a [http://pellepim.bitbucket.org/jstz/ nice
little library] that applies heuristics based on the offset and DST
information, but this isn't native to the browser.
One potentially easier solution would be to use `getTimezoneOffset()` to
provide filtered suggestions for the picker, and expose these to the user.
This would require outputting the timezone offset in
`wp_timezone_choice()`, which would also allow us to show the current time
live as you change the timezone.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/10660#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list