DEV Community

Cover image for Change the time zone on a Heroku app

Change the time zone on a Heroku app

Paula Santamaría on August 27, 2018

I discovered Heroku a few weeks ago. It's a great platform to deploy your apps, specially because of their Free plan which I've been using as dev e...
Collapse
 
safwa9amar profile image
Safwa9amar

thanx bro you save my life

Collapse
 
brett84c profile image
Brett Connolly • Edited

Hell yes! You saved me a heart attack. I couldn't figure out why my app that just went live was being screwy with the dates despite my testing and live environments being connected to the same database. Thank you!

Collapse
 
paulasantamaria profile image
Paula Santamaría

Timezone issues are a nightmare! Glad I could help :)

Collapse
 
mguimaraes16 profile image
Marcello Guimarães

Paula, you are a hero, I didn't realize that would be so easy, I was about to change my.net core api to get my Timezone(Brazil) and let be honest, it would be a headache, and it wasn't necessary, Thank you!!

Collapse
 
paulasantamaria profile image
Paula Santamaría

Glad I could help :D and thanks for reaching out!

Collapse
 
xanthisafk profile image
Abhinav

Thank you very much! 👍

Collapse
 
princebillygk profile image
Prince Billy Graham Karmoker • Edited

Very useful thanks

Collapse
 
vjnvisakh profile image
Visakh Vijayan

Thank you so much

Collapse
 
raxraj profile image
Ashutosh Kumar

Saved my little ar**!! Can't thank you enough Buddy!

Collapse
 
sinisimattia profile image
Mattia Sinisi

2 years later and this article is STILL useful

Collapse
 
paulasantamaria profile image
Paula Santamaría

Thanks Mattia, glad to hear that :)

Collapse
 
confusedcoder1 profile image
Shristi Singh

I really was calculating times to adjust them, when I found this. I thought as regions are permanent timezones must be too. But huh. You saved me. Thanksss.

Collapse
 
madza profile image
Madza

Thanks, just found it useful 😉👍

Collapse
 
ysoul801 profile image
ysoul801 • Edited

I can't thank you enough ! just signed up to leave a comment (maybe more use in future d: )

Collapse
 
paulasantamaria profile image
Paula Santamaría

Glad to help! Also, you won't regret signing up to this platform :)

Collapse
 
naothomachida profile image
Naotho Machida

Thanks! Solved

Collapse
 
kk007 profile image
Keval navadiya

If I just add TZ config and I am doing something which requires system time will it use timezone set by using the TZ ?

Collapse
 
paulasantamaria profile image
Paula Santamaría

Yes, that's how it usually works. I'm not sure if there are any specific cases where that's not the case.

For example, if you deploy a node.js app that does something like var now = new Date(), it will use the timezone you specified in your TZ config.

Collapse
 
gerocoded profile image
Luis Gerónimo

¡Muchas gracias! Me ayudaste en mi proyecto de tesina.

Collapse
 
paulasantamaria profile image
Paula Santamaría

Me alegro!

Collapse
 
lafriedel profile image
Leigh-Ann Friedel

Thank you so much for this article! I'm building an app with a small team and we have been fighting with getting proper dates to display. It's consistently been one day behind. This fixed it!

Collapse
 
paulasantamaria profile image
Paula Santamaría

Glad I could help! :)

Collapse
 
monishbasaniwal profile image
Monish Basaniwal

Time is a complex thing, and Paula you helped me out today. I never imagined it to be soo easy!

Collapse
 
paulasantamaria profile image
Paula Santamaría

I'm glad, Monish!

Collapse
 
azhariemuhammad profile image
Muhammad Amri A. Azhary • Edited

Many thanks.

Collapse
 
paulasantamaria profile image
Paula Santamaría

Happy to help!

Collapse
 
felipealvarez23 profile image
felipealvarez23

Thank you men, It worked

Collapse
 
greegav profile image
Andrii Hryhoriev

Many thanks for this advice!
It is REALLY helpful.
Good Luck!

Collapse
 
paulasantamaria profile image
Paula Santamaría

You're welcome!

Collapse
 
awelle profile image
Awelle

This just ended my 3-day heartache. Literally. Thank you for sharing.

Collapse
 
paulasantamaria profile image
Paula Santamaría

I'm glad! Thanks for letting me know :)

Collapse
 
shashankojhabot profile image
Shashank Ojha • Edited

Thanks for Posting this.
It really helped.

Collapse
 
nirajsharma99 profile image
nirajsharma99

Thankyou so much this saved much of my time. You are awesome ;)

Collapse
 
luchorivas profile image
Luis

Sos muy crack Pau

Collapse
 
paulasantamaria profile image
Paula Santamaría

jajaja justo te iba a decir que no me habias dejado un comentario. Gracias, green mario.

Collapse
 
ahisyfa profile image
Ahmad Isyfalana Amin

Thanks Bro