I’m using time.Format to format a date on my blog posts.
It renders correctly on my local machine, but does not when using Netlify’s continuous deployment.
I think it might be that time.Format relies on the machine’s time zone setting and it’s not configured on the build server. I have tried setting the timeZone parameter in the site’s config.toml. That didn’t work. I tried setting an environment variable in the netlify dashboard (TZ=‘America/Detroit’). That didn’t work.
I’ve seen some stuff saying I might need to do something in a netlify.toml file, but I haven’t tried that because I couldn’t find anything that looked like what I needed (or that would be different from just setting the environment variable in Netlify.)
Special thanks to you folks on here by the way at being so helpful and also VERY quick to answer questions. Joe, you have answered a couple of things that I have gotten stuck on now, and it’s very encouraging to someone learning. I appreciate you all and keep up the fantastic work!