How do I set the timezone on my dyno?

Issue

You want to change your dyno's timezone.

Resolution

To change your dynos timezone you have to add a TZ environment variable to your application.

For example:

heroku config:add TZ="EST"

For daylight savings:

heroku config:add TZ="America/New_York"

Note: Changing your dynos timezone is not usually a good idea. Best practice would be to store/use time in UTC and instead convert the UTC time as appropriate at the view layer/client side for display only.

Note: this will not affect logs, as these are always in UTC.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support