[wp-trac] [WordPress Trac] #18146: Add user-level timezone setting

WordPress Trac noreply at wordpress.org
Sun May 4 13:25:01 UTC 2014


#18146: Add user-level timezone setting
-------------------------------+-----------------------------
 Reporter:  RanYanivHartstein  |       Owner:
     Type:  feature request    |      Status:  reopened
 Priority:  normal             |   Milestone:  Future Release
Component:  Users              |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  needs-patch        |     Focuses:
-------------------------------+-----------------------------

Comment (by swissspidy):

 I was digging into the code to see how we should implement it the best way
 and I'm still trying out different things.

 Would love to see this feature in WordPress. So for a first try I created
 a small patch (far from perfect) that does the following:

 * Creates a `user_timezone` field, whitelists this field and saves it to
 the database
 * Modifies the `wp_timezone_choice`function to exclude manual GMT offsets
 using a second argument.

 Note on the manual offsets: It seems like WP uses them in the general
 options for backwards compatibility and they aren't necessary for user
 timezones.

 For part 2 (and n) I think the easiest way would be to use PHP DateTime
 functions to respect the timezones. But I'm unsure on how to best do this
 so I'm open for ideas.

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


More information about the wp-trac mailing list