Jekyll dates, timestamps require timezones

· Read Later

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-24 12: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-24 12: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!


Feedback and support

For comments and questions, tweet out to @Rubenerd_Blog, or email me at weblog at ruben schade dot com. Let me know if you don't want your comment posted.

Instead of running banner ads or tracking you with JavaScript, I also accept the following donations or referrals if you found something useful or fun. Thank you :).