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: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
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?
In the root of your project: see docs.
I don’t believe so.