[wp-trac] [WordPress Trac] #29205: Remove manual UTC offsets that are not officially used

WordPress Trac noreply at wordpress.org
Tue Jul 14 13:42:10 UTC 2015


#29205: Remove manual UTC offsets that are not officially used
-------------------------+------------------------------
 Reporter:  nerrad       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Date/Time    |     Version:  2.9.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  administration
-------------------------+------------------------------
Changes (by ryanduff):

 * keywords:   => has-patch


Comment:

 I've gone ahead and created a patch that trims the manual offsets down to
 the valid set. One of the issues I found with people setting invalid
 manual offsets is that if you're doing some DateTime things in PHP and
 passed it an invalid offset to convert to timezone, it throws a fatal
 error. So I'm certainly in the camp of only providing a valid set of
 options.

 To address Helen's concerns over "what if someone is using an invalid
 setting" ... nothing would change immediately. The setting persists in the
 database. The point it would change would be when someone goes to Options
 > General then saves something on that page. This would overwrite their
 current invalid timezone setting in the database. With an invalid option,
 the select will default to the first value so I added an additional check
 to reset this to 'UTC+0'. Otherwise it was selecting Africa/Abidjan which
 was likely far more undesirable as a replacement than UTC+0

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29205#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list