Can I set a custom timezone in the build environment?

Hi, it seems that when the build process runs the “server” that runs is set to UTC time zone. Is it possible for a given site to set a different default time zone?

Sure. It’s unix. You can do things like set a TZ environment variable in your site build environment variables :slight_smile:

So would it be like this (trying to set Central Standard Time)? I tried it via both the UI and in netlify.toml and neither seems to have an effect.

  TZ = "UTC-6:00"

Any answer to my question? Is that the correct method and, if so, why might it not be working?

Hello, @brycewray, it’ll be more like TZ='America/New_York'. You can see all the available tz database timezones here:


Thanks! Was taking you literally about Unix so was following various online advice about doing it from the usual CLI. :grinning: Will give your tip a try when I’m back home.

Cool. Let me know how it goes.

1 Like

Appears to have worked very well. Thanks again!

1 Like