posted on Wed, Aug 16 '17 under tag: tech

The short story of a cute little problem between Jekyll, Gitlab Pages, and me

It was late past midnight when I finished writing yesterday’s post on independence day. I wanted to share the article on my social channels fast and get it done with.

So I commit and push. The slack integration immediately tells me that the commit has been pushed and I get a notification for successful completion of pipeline in about a minute.

The problem: I go to the live site and I can’t see the new post!

I check, double check

Then it suddenly struck me.


This is a time zone problem!

To be true to time, I had put the post date as 2017-08-16 in the file name. It was past midnight of 15th night and I was on August 16th IST. I also do not include post time in front matter because I rarely post more than one post per day.

Jekyll, by default, doesn’t output posts with a future date.

Now, when I generate the site on my computer, since I’m on IST, the post compiles and shows up in the site.

But when I commit and Gitlab CI builds the site, probably somewhere in Europe, the clock is still in August 15 and therefore the post I wrote in August 16 is in the future.

So I changed the date of my post to August 15 and voila, it was instantaneously published.


My sincere apologies for getting angry at Gitlab for a second and thinking of even going back to Github pages before realizing what the acutal problem was.

Like what you are reading? Subscribe (by RSS, email, mastodon, or telegram)!