Opened 4 years ago
Last modified 3 months ago
#10660 assigned feature request
Time zone suggester based on nascent WordPress.org API call
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Date/Time | Version: | 2.8.4 |
| Severity: | normal | Keywords: | has-patch gci |
| Cc: | otto@…, cnorris23@…, d@…, travis@… |
Description
The attached patch uses a new API call to http://api.wordpress.org/core/ip-to-zoneinfo/1.0/ to retrieve a suggested time zone based on client (not server) IP address.
A button is added next to the existing dropdown list of time zones providing the option to "Suggest a time zone". This calls the API using an AJAX/JSONP request which then auto-selects a time zone for the user from the dropdown.
Visual feedback is via a spinner when fetching and then a text response.
Additionally the Date and Time settings have been split out to a new settings page.
Related ticket: #10324
Attachments (3)
Change History (18)
- Milestone changed from Unassigned to 3.1
- Type changed from task (blessed) to feature request
Moving to 3.1. Not sure we need to spawn another options panel for this though.
- Keywords gci added
- Owner set to rmccue
- Status changed from new to assigned
This updated patch does the same as Sam's, but simpler, and also asks the user before using the supplied timezone as the value.
- Cc d@… added
I see this as "pure" JS based solution. The browser "knows" the right timezone and the UTC offset. The user's IP might not be in the same timezone (proxy?).
We have a name-to-zoneinfo API call too:
http://api.wordpress.org/core/name-to-zoneinfo/1.0/?callback=abcd&s=memphis
Could be good for auto-suggest based on search string.
comment:10
Otto42 — 7 months ago
#10324 was marked as a duplicate.
comment:11
helenyhou — 7 months ago
#9759 was marked as a duplicate.
comment:12
helenyhou — 7 months ago
- Component changed from Administration to Date/Time
- Cc travis@… added
http://pellepim.bitbucket.org/jstz/ might be a candidate for use... grabs a timezone as opposed to a UTC offset, and is MIT licensed so inclusion in core should be possible.
comment:14
Otto42 — 3 months ago
Yeah, but man, that is one wacky fun bit of JS to do the detection.
Not my area of expertise, but if it works, then great.
I'm not one to look a gift horse in the mouth ;)

An attribution for use of GeoNames will need to be included somewhere in the interface or on the WordPress.org site/docs for us to be able to use this.