Thanks to some keen observers who have recently noted a long standing problem with Feed2JS— for the display of the date and item was posted, we had been using some Magpie and PHP functions to convert the date/time stamp of an item to a milliseconds value and then using the php date() function for the screen display. Yet I was overlooking the fact that the functions were converting the time into one relative to the local time on my server.
Of course, when testing against this blag, the date/time stamps were okay since its on the same server and in the same timezone.
To calculate the time zone offset will take some effort since the date/time formats of feeds have about 5-10 different variations. One option is to include a new parameter that will allow a user to indicate the timezone offset from our local time– this can be as simple as the build page displaying our local time and giving a drop down menu to select offsets from +12 to -12 to correct the offset.
Until I figure that, I have recoded the date/time stamping to just use whatever string is provided in the feed item; and some simple clean up such as removing “Z” from Atom date/times, and stripping the time zone offsets from RSS 1.0 feeds. Please let me know if you see anything weird.
This means, for the past 2 years or so, y’all been displaying feeds in Arizona time! Maybe no one minded…