PHP & RSS Date Weirdness!

Absolution

New Member
I have a PHP generating an RSS feed for my blog. I recently moved servers and the servers posts the date differently and firefox doesn't seem to like the newer dates as it doesnt show them up in my RSS feed. Other browsers dont seem to have a problem however.

Take a look here:
http://www.skepticize.me/subscribe/rss.php

So the new server shows things like (which firefox doesn't like):
<pubDate>Sun, 02 Oct 11 20:01:36 -0400</pubDate>

Old sever shows things like (which works fine):
<pubDate>Sat, 04 Jun 2011 14:22:27 MDT</pubDate>

This is the PHP code I have which generates and saves dates:
$blogdate = date(DATE_RFC822);

It seems the new server is giving -0400 which firefox doesn't like. Any suggestions on fixing this? Keep in mind I'm somewhat of a PHP newbie.
 

n1c0_ds

New Member
Perhaps it has to do with a parameter in your PHP.ini file? Otherwise, you can format your date() function manually in a way Firefox likes.

I think you might have a problem with firefox, though, because my site uses the +0000 format and Firefox has no problem with it (FF7)
 

Absolution

New Member
Perhaps it has to do with a parameter in your PHP.ini file? Otherwise, you can format your date() function manually in a way Firefox likes.

I think you might have a problem with firefox, though, because my site uses the +0000 format and Firefox has no problem with it (FF7)

I will need to check it on other computers! If you could take a screen shot for me it would be great.
 

Absolution

New Member
Update! I tried it on another firefox browser and computer. The RSS still opens and shows all the entries but it won't show the newer dates with the -0400. Weird!
 

Absolution

New Member
Anyone have any other suggestions for this Firefox quirk? If all else fails, maybe I can contact the firefox team about this?
 

DHDdirect

New Member
If you set the default timezone in PHP does that help the issue?

Code:
[COLOR=#000000][COLOR=#0000BB]date_default_timezone_set[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'MDT'[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
 
Top