[wp-trac] [WordPress Trac] #30429: wp.newPost gets non-GMT date calculation wrong

WordPress Trac noreply at wordpress.org
Mon Dec 9 19:54:28 UTC 2019


#30429: wp.newPost gets non-GMT date calculation wrong
--------------------------------------+-----------------------------
 Reporter:  smerriman                 |       Owner:  wonderboymusic
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.3.1
Component:  Date/Time                 |     Version:  3.4
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"46864" 46864]:
 {{{
 #!CommitTicketReference repository="" revision="46864"
 Date/Time: XML-RPC: Сalculate the proper offset for GMT in `wp.newPost`,
 `wp.editComment`, `mw.newPost`, `mw.editPost` when `post_date` or
 `comment_date` is set.

 Previously, `post_date` or `comment_date` was assumed to be GMT, which is
 only true if the timezone string for the site matches GMT.

 Add unit tests.

 Props Rarst, smerriman, justdaiv, wonderboymusic, noyle.
 Fixes #30429.
 }}}

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


More information about the wp-trac mailing list