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
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.
[build.environment]
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: List of tz database time zones - Wikipedia.
Thanks! Was taking you literally about Unix so was following various online advice about doing it from the usual CLI. Will give your tip a try when I’m back home.
Cool. Let me know how it goes.
Appears to have worked very well. Thanks again!
Where should I put netlify.toml file?
Is there anyway that I can set timezone in the UI?
I’m not certain what I’m doing wrong. I have set a TZ in my [build.environment] and it doesn’t seem to be working.
[build.environment]
TZ='America/Chicago'
Which site/deploy is this about?