How to use and define UTC time in the frontmatter

There’s only one mention of UTC but that’s when you would want to convert time.

I don’t want to convert time.

I want the time that I define in my frontmatter to strictly be UTC

This works:

date: 2019-10-04 18:05:00

I don’t know why this doesn’t:

date: 2019-10-04 18:05:00 UTC

I would try

date: 2019-10-04 18:05:00 0000

because there’s -0700 in the docs, but I’m guessing that’s GMT-7, not UTC-7 which is not quite the same thing unfortunately because GMT is not the same all year around (to my knowledge, I might be wrong but UTC is just easier for me to deal with on the frontend).


date = {{ now.UTC.Format "2006-01-02T15:04:05-0700" }}
draft = true
title = "{{ replace .Name `-` ` ` | title }}"
1 Like

What about using Z?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.