How to get netlify automatically get post update date? and how can i set time zone?

Hello, I want hugo to automatically update date whenever my post gets update. Also I want to set a time zone? Please help me with that.

You can set a timezone in the usual unix way, by using $TZ. Here’s me setting it to my zone and running hugo:


Git isn’t very good at storing date information, so really our system has no idea what the last modified dates on your files are. So, you’ll probably need to update the frontmatter on the post with a new date to achieve your other goal. But maybe someone else who is more of a Hugo whiz than me knows a different trick :slight_smile:

1 Like

where should I put this? in the config file?

That is my netlify build command. Instead of hugo, I use TZ=PST8PDT hugo