Msg#: 4114176 posted 8:40 am on Apr 12, 2010 (gmt 0)
I am trying to work out how to change the way the time/date are displayed in my feed. I am dynamically creating the feed through PHP, and it works fine but I would like the pubDate to not have the time in it as it is irrelevant to the content. Some browsers seem to show the year and some don't, so it would also be nice to get that to display on all browsers (perhaps this is not possible?) I am pulling the data from a mySQL database in the following format (yyyy-mm-dd) and then converting it to RFC2822. If I manually strip out the last 15 chataracters the pubDate is reverting to current time. Is there a way to at the very least remove the time from the end of the pubDate displayed? In IE I seem to be getting the day of the week too (which is fine and what I would really like everywhere), while in Chrome I don't seem to be getting any date/time. Safari and Firefox also do not display how I would like it. Perhaps this (as mentioned above) is browser related and there is nothing I can do about it? I have run the xml through an rss validator and it is happy with it. Thanks for any help in advance.
Msg#: 4114176 posted 8:53 am on Apr 12, 2010 (gmt 0)
Welcome to WebmasterWorld dnab.
I'm afraid your feed will not validate if you don't give it the proper format for pubDate. All date-times in RSS conform to the Date and Time Specification of RFC 822 [asg.web.cmu.edu].
I wouldn't be concerned what shows up in various aggregators or viewers if the feed conformed to the standard and was valid. You can't control how others interpret the standard, but you can generally be safe by following it yourself.
Msg#: 4114176 posted 9:08 am on Apr 12, 2010 (gmt 0)
Thanks for the very quick response. Since I can't remove the time I have set it manually to 18:00 however although Safari seems to display the time as 6:00 PM, IE is displaying the time as 7:00:00 PM. I appreciate I can't control how the timestamp/pubDate is displayed but I am somewhat still confused! When I do a view code in IE the pub date reads as in the format of the following example: Thu, 26 Nov 2009 18:00 +0000
Is this a GMT/BST thing? I guess there isn't a way to fix that either and I have answered my own question? What would happen if an RSS feed needed to be accurate in the way the time was displayed? Thanks again for your help.
Msg#: 4114176 posted 1:56 am on Apr 13, 2010 (gmt 0)
It sounds like IE is accessing your system settings and adjusting for daylight savings (Summer) time. Just make sure that you are using the proper UTC time with your pubDate and then you should be safe.