Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.