I’ve been bothered by the issue of inccorect displayed time stamps for Feed2JS, so I diverted from a few tasks at hand to take a new approach. The MagpieRSS library has a nice function that returns the date/time stamp of any item, in its myriad formats and tag names, as one of those values of number of seconds since January 1, 1970. The problem is that this value is offset by my server’s local time. So my time becomes your time.

So first I have a new logic that determines our server’s local offset from GMT (it changes on time of year since we boycott Daylight Savings Time in Arizona), so our offset is either GMT-7 or GMT-8. So internally, I am converting all those date/time stamps to GMT time. And now, Feed2JS has a new option that allows you to enter your local offset from GMT. The Build a Feed Form will display the current GMT so you can calculate the offset. This will generally by negative numbers if your local time is ahead of GMT, and positive numbers of your local time is after current GMT time. And if you have one of those funky midway times like South Australia, your offset needs to be entered as a decimal fraction, +9.5.

If you prefer not to deal with this at all, just enter “feed” and we will display the string as recorded in RSS.

I am still testing this, so it is not rolled into the Feed2JS downloads yet.

If all this makes your head spin or you are a time junkie, make good use of TimeAndDate.com and the World Time Clock there. It’s a lifesaver if you communicate with people out of your “zone”.

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca