[wp-trac] [WordPress Trac] #20398: get_date_from_gmt does not respect DST
WordPress Trac
wp-trac at lists.automattic.com
Mon Apr 9 19:47:59 UTC 2012
#20398: get_date_from_gmt does not respect DST
--------------------------+-----------------------------
Reporter: scholesmafia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
get_gmt_from_date uses `DateTime` class (albeit in a rather horrible way)
to respect DST differences. The dual function get_date_from_gmt does not
do the reverse. Hence:
{{{
var_dump(get_date_from_gmt('2012-02-01 12:00:00'));
}}}
Will return `'2012-02-01 12:00:00'` if in `Europe/London` outside DST, but
`'2012-02-01 13:00:00'` inside DST.
Bug was noticed with RSS importer plugin which uses this function. If the
core behaviour is by design (i.e. no intention for DST support on this
function) then I will open another bug there.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20398>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list