A Matter of Time
October 9, 2019
Several weeks ago, when I started to add a JSON
had to consider what time stamp to use for
date_published. As I blog
often more than once during the day, and all such entries end up on
the same page, there is no specific publication time to assign to
such a page. Well, technically I could keep track of the last time the
page was modified, but that would make
tumblelog more complex, and I
like to keep it a simple program. And while
optional in a JSON feed I preferred to give it a value.
So, at first I just set
date_published to just the date of the day I had published the blog entries on. Last week, when validating the JSON feed I learned that that's not a valid value for
Also last week, upon reading the RSS specification, another more known
feed format, I noticed the following note associated with the
Its value is a date, indicating when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date.
This led me to the idea of using the end of the day as the publication date. Or: I blog during the day, and at the end of the day all entries are considered published.
This decided I started to add RSS feed support to both the Perl and Python version of
The only downside, so far, is that the Feed Validator reports for the RSS feed:
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
- line 1, column 502: Implausible date: Wed, 09 Oct 2019 23:59:59 +0200
After having decided to use the end of the day as publication time came the next task: encoding the local date and time in the correct format. A JSON feed uses RFC #3339 while RSS uses RFC #822.