Convert all times to UTC

@red_trela Are you talking about just getting the date to from from ISO => your preferred format, or are you having difficult w ISO => UTC => preferred format. If the latter, the formatting for dates seems tricky with Hugo at first (especially when compared to liquid or other mustache-based templates), but the syntax is easier than what you might expect from the typical %Y formatting (PHP, etc).

.PublishDate.Format “Jan 2, 2006”

Just remember January 2, 2006.

Let’s say you are publishing a piece of content on March 18 and have the following at the top of a content .md file:

publishdate: 2016-03-18

Then in layouts/_default/single.html you could do:

{{.PublishDate}} => 2016-03-18 00:00:00 +0000UTC
{{.PublishDate.Format "Jan 2, 2006"}} => Mar 18, 2016
{{.PublishDate.Format "January 2, 2006"}} => March 18, 2016
{{.PublishDate.Format "2006-01-02"}} => 2016-03-18
{{.PublishDate.Format "2006"}} => 2016
{{.PublishDate.Format "Jan 2006"}} => Mar 2016
{{.PublishDate.Format "January 2006" | upper }} => JANUARY 2006
(Throwing in another filter for good measure with "upper")
{{.PublishDate.Format "January 2"}} => March 18
{{.PublishDate.Format "January 2 at 4:00 PM"}} => March 18 at 0:00 AM
(This will format to the correct time if you are including M/H in the front matter for your content)

Is this what you’re looking for? Or do you have a series of markdown files that you want to convert into UTC within the front matter?

If you want to dig a little deeper, you can see some of the logic behind the formatting in the GoLang docs