Opened 13 years ago
Closed 13 years ago
#20398 closed defect (bug) (duplicate)
get_date_from_gmt does not respect DST
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Date/Time | Keywords: | |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (5)
#2
@
13 years ago
Related: Plugins #1509
#3
@
13 years ago
From what I can see, the hook described at comment:1:ticket:20328 still only computes the offset based on the current date, not on the date to be computed. I reckon #20328 is still a valid bug and this is a duplicate of it.
Fix to respect DST