[wp-trac] [WordPress Trac] #20328: get_date_from_gmt assumes current gmt_offset is appropriate

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 9 20:24:09 UTC 2012


#20328: get_date_from_gmt assumes current gmt_offset is appropriate
---------------------------+-----------------------
 Reporter:  scottconnerly  |       Owner:
     Type:  defect (bug)   |      Status:  reopened
 Priority:  normal         |   Milestone:
Component:  Date/Time      |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  2nd-opinion    |
---------------------------+-----------------------
Changes (by scholesmafia):

 * keywords:  close => 2nd-opinion
 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Related: #20398

 I'm not sure the the bug is addressed with this hook. This still uses an
 offset which is computed based on the current date, and that offset is not
 valid for all dates in that timezone.

 Example: Timezone is `Europe/London`. Date is `2012-04-09`, so we're in
 DST. gmt_offset should therefore be 1. Now I want to find the local time
 of the UTC `2012-01-01 12:00:00` using my timezone. The low-level code and
 the hook both add 1 hour to that time, which is incorrect.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20328#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list