It works, only that I had to change the fifth line in your code to
{{$pubDate := mustToDate "2006-01-02 15:04" $md.Meta.date}}
and change the way I set post date in YAML header:
---
title: Install Jekyll on Mac OS
date: 2017-09-29 17:42
---
toDate function required second argument and while diggin in I’ve found mustToDate more strict and informative.
Since I’m going to use this template for rss.xml as well I think proper date handling is critical.
Francis, you’re my savior, this is for you.