What timezone is Heroku server using?
Heroku is UTC by default. You can change it by setting an env var to TZ=America/New_York
or whatever, but I highly recommend you don't.
It's really good practice to keep all your server stuff (Heroku, CMS, etc.) in sync at UTC, and to only change this when displaying times clientside with something like Luxon.
Keeping this stuff in sync will save you a lot of headaches.
By default Heroku will return calls for current time in UTC.
You can manually set your app's time zone by adding a TZ environment variable via the config command. Keep in mind that you must use the tz database time zone format. For example, if you wanted to set your default time zone to US Central time you would use the following command (I'm assuming you have/use heroku toolbelt) :
heroku config:add TZ="America/Chicago"
EDIT: As treecoder points out in the comment below; the TZ
ENV variable can be added via the Heroku dashboard if you prefer. Open your app's dashboard and navigate to the 'settings' tab, then under 'config variables' click the 'reveal config vars' button. You will then be able to add TZ
= America/Chicago
(or whatever timezone you need).
NOTE: The TZ
environment variable does not affect logs. See the second note here.
According to this, Heroku Help Log, you can change it with TZ variable. However, this never changes your log times, as they are always UTC.
Heroku is UTC by default. Open your app in heroku and go to app setting
and click on Reveal Config Vars
as in image
and you have to add var as in image
TZ=Asia/kolkata
Then it will work fine for INDIA time zone. you can choose your time zone from time-zone-list.