Note: This website has been deprecated and is no longer maintained.

Posts tagged with time

"Incorrect" Timezone on Heroku

This is just a friendly reminder that on Heroku will give you server time, ie: PDT/PST, and not the local time for your app.

Since usually you want time calculations to be done with the correct zone for your app, just make sure to include 'zone' in your call for, like so:

I have the following in my config:


config.time_zone = 'Mountain Time (US & Canada)'

Here's the difference for me in Heroku's console: #=> 2011-08-20 18:53:06 -0700 #=> Sat, 20 Aug 2011 19:53:08 MDT -06:00

So, remember, always use instead of

Happy time travel!

Posted by Mike Pack on 08/20/2011 at 07:56PM

Tags: heroku, time