Jekyll dates, timestamps require timezones

Software

Crew from the USS Relativity, a timeship from Star Trek

No, I’m not referring to dating Jekyll, I’m already taken. I’m also not referring to those fruits that oddly enough I don’t care for.

I couldn’t figure out why posts with a defined date weren’t appearing in my local Jekyll install. In the YAML matter, I’d written it as such:

date: "2005-01-24T12:00:36

Some more astute readers may already see the problem, but I was scratching my head late at night wondering why. Yes, it turns out you need to define the timezone.

date: "2005-01-24T12:00:36+1000

It makes sense. If my base is UTC, that time I defined above wouldn’t have happened yet, and I had configured Jekyll to not post items from the future. I mean, I’m not part of the USS Relativity’s crew or anything.

Now comes the task of editing my maintanence Perl script to add the appropriate timezones for thousands of entries, written in Singapore, Kuala Lumpuer, Adelaide and Sydney over the years. Fun times!

Author bio and support

Me!

Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.