Possible bug? Content page will not render if data is > 2018-04-12


#1

I’ve just been trying to diagnose some strange behaviour - but to make sure I’m not missing something obvious, thought I’d post here before putting up an issue on github.

I have a site running Hugo (just upgraded using brew from hugo 0.34 -> 0.38.2 and confirmed issue persists) - code is on github here: https://github.com/kidwellj/jeremykidwell.info. The bug should be easy to replicate - simply clone the site, hugo serve it, and then edit the date field on /content/presentations/201804_leeds.md to be anything greater than 2018-04-12 (so increment one day to 2018-04-13). That page suddenly drops off and doesn’t render on any pages. I’ve been through templates etc. and can’t find anything obvious that might be the culprit. Is there some reason that date range is causing hugo to fail? Very grateful for any input folks might have on this.


#2

It may be a time zone issue. This is on the todo list in Hugo. But when you say 2018-04-13 this is UTC, and may possibly be tomorrow depending on where you are.

You can confirm by running:

hugo server --buildFuture

You could work around this issue by adding time with time zone info to your date.


#3

Thanks for this. Looks like the problem was being caused by my using deprecated .Now.Unix which I’ve swapped for now.Unix and seems to be flying along happily. Will definitely hang onto that --buildFuture option which is quite useful.