Technology / Software / 

15 Jun 2017

Jekyll date format string

The Jekyll static site generator has strong opinions about the formatting of time/datestamps that it will parse. There’s nothing wrong with its format, but it’s not one of the formats that you can easily produce with date with a single flag, like date -I.

$ date "+%Y-%m-%dT%H:%M:%S%z" 2017-06-15T19:30:07-0400

Maybe it’s a Ruby thing, but it’s just slightly different than ISO 8601 format, due to the lack of a colon between the hours and minutes in the time zone offset:

$ date -Is 2022-07-25T22:36:11-04:00 $ date "+%Y-%m-%dT%H:%M:%S%z" 2022-07-25T22:36:24-0400

Dates and computers are fun.