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

WordPress Trac noreply at wordpress.org
Sun Apr 6 16:22:06 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 rianjs):

 I'm not sure the whole elephant needs to be swallowed in one gulp.
 Perhaps/probably I am underestimating the complexity of the task.

 I would break it down into stages...

 '''Part 1: Building the infrastructure'''
 * Create a {{{user_timezone}}} field in usermeta when a user registers (or
 updates their tz preferences) in wp-admin
 * Add a tz dropdown to {{{wp_admin/profile.php}}} (generated with
 {{{wp_timezone_choice}}}?).
 * I don't think the add/update/delete/get_user_meta functions would need
 to be touched, as they seem pretty generic(?).
 * Get the translation work done for the new db and UI elements
 * Update the docs to include information about the new field

 It looks as though WP saves metadata in both local (server) time, and UTC
 (gmt) time. That should make it very easy to create a filter to convert a
 UTC timestamp to the user's local time in Phase 2.

 '''Part 2: Making use of the capability in the core'''
 * Show users post and comment metadata in their time zone, if they have
 specified one, otherwise using the server's default time zone
 * Relevant translation work
 * Update the docs for elements that are making use of the new field

 '''Part n: Infinity and beyond'''
 * Socializing the capability so plugin authors can make use of it in their
 plugins

 I have some free time on nights and weekends, and I'm game to work on the
 non-translation parts of Phase 1 and the "show post and comment metadata
 in a user's local time" from Phase 2. (I've done a quite a bit of
 development work involving PHP time zone handling and conversions.)

 I know I must be missing other pieces of the puzzle... what other pitfalls
 and unknowns await?

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


More information about the wp-trac mailing list