Jump to content

LastRSS and timezone problem


laduncan

Recommended Posts

I've run into a problem, and I'm assuming it's a simple fix, but I can't figure it out.

 

I'm using lastRSS.php to parse some internal RSS feeds, and it appears to be reading the feed timestamp as GMT (I'm in CDT).  It uses this code to format the text:

      // convert pubDate to specified date format

      $result['items'][$i]['pubDate'] = date($this->date_format, $timestamp);

Date_format is null, though I've tried adding different date() parameters to date_format without luck.

The timestamp of a feed might be 8:04am, and lastRSS will read that as 3:04am.  If I change the local timezone, this time changes.

 

At the moment, I've just hacked it with

                  $timestamp = strtotime('+5 hours',$timestamp);

 

but this won't work when we go on and off daylight savings time, and, anyway, I want to figure out how to make this work correctly. 

 

Do you have any ideas?

 

Thanks very much!

 

Lane

 

Link to comment
https://forums.phpfreaks.com/topic/64880-lastrss-and-timezone-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.