WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 12 months ago

#28988 new enhancement

Detect Time Zones automatically at installation

Reported by: danielmount Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Date/Time Keywords: dev-feedback needs-patch
Focuses: javascript Cc:

Description

Currently, upon installing Wordpress, one of the steps I always take is to go to Settings > General > Timezone to manually set my time zone. I've been using Wordpress for eight years, so I know to do it and how to do it, and it's just a minor inconvenience. However, I have seen people new to this platform be confused and/or not know how to change this.

Is it technologically possible to use a geolocation service to query the IP address of the computer installing Wordpress and automatically set that service's best guess as to time zone, perhaps during the setup process?

I would envision the UI option remaining in settings, in case, for example, a developer in one time zone builds a site for a client in another. But automatic detection would be perfect for the average new user. It would be one more element that just works out of the box for those who aren't particularly tech savvy.

I did some searching in Trac to see if I could find a similar ticket and couldn't find any.

Change History (8)

#1 @michalzuber
3 years ago

  • Keywords dev-feedback added
  1. We could set timezone according to selected language #28577
  2. With JS jstimezonedetect

#2 @danielmount
3 years ago

I like option 2. With option 1, it would work for some languages, but English and Spanish are spoken worldwide, and Chinese and Russian span a wide number of time zones as well.

#4 @ocean90
3 years ago

#29394 was marked as a duplicate.

#5 @chriscct7
2 years ago

  • Keywords needs-patch added

#6 @curdin
14 months ago

Is this a nicety worth 43 kb (12 kb compressed) in js libs? It might be better to see this as a progressive enhancements seeing that Intl is now more widely available http://caniuse.com/#search=Intl (although whether timezone detection is working correctly is TBC)

Last edited 14 months ago by curdin (previous) (diff)

#7 @dd32
12 months ago

  • Focuses javascript added

It looks like we'll be able to use Intl.DateTimeFormat().resolvedOptions().timeZone here now.

It's supported by recent Chrome & Safari, Firefox 52 will support it (Currently in the Developer channel), however IE is likely not implementing it. Progressive enhancement to support it when possible seems like a good option to me.

I'm unsure of what UI it should have though, transparent in the background? option to select timezone hidden behind a Timezone: Australia/Brisbane [change] section, etc.

#8 @danielmount
12 months ago

I favor the option to select a timezone hidden behind a timezone selected by default.

Selecting the admin's time zone automatically should be correct in most cases, but I can think of several exceptions where ability to change would be useful, e.g. a developer in one time zone building a site for an organization in another, or a website being built through a VPN in a country with restricted Internet access, like China.

Note: See TracTickets for help on using tickets.