Plugin Directory


Opened 6 years ago

Last modified 6 years ago

#1509 new defect

RSS import script uses GMT offset incorrectly in DST

Reported by: scholesmafia Owned by: Bueltge
Priority: high Severity: normal
Plugin: rss-import Keywords: dst offset date


Under certain conditions, the RSS importer (and possibly other importers) incorrectly calculates the post date. Consider a post containing the following XML:

<pubDate>Tue, 17 Feb 2009 23:30:28 +0000</pubDate>

Timezone is set to Europe/London, which is currently in DST (UTC+01:00). gmt_offset is hence 3600.

The plugin correctly determines the Unix timestamp and returns the correct date after formatting. However when calculating the local post time, the current gmt_offset is added:

$post_date = get_date_from_gmt( $post_date_gmt );

This offset is added irrespective of whether the post date is within DST or not. Obviously the dual would also occur — DST dates imported when outside DST would not have the local offset added.

I have filed #20398 against core to address this, but in the event that it is not picked up there then using the timezone_string option as per the patch would fix this issue.

Change History (1)

comment:1 @scholesmafia6 years ago

Core #20398 marked as duplicate of (reopened) Core #20328

Note: See TracTickets for help on using tickets.