Joined October 2012
·

Johnny Rodgers

Senior UI Developer at Systems for living
·
Vancouver, Canada
·
·
·

Posted to Set timezone for your Heroku app over 1 year ago

checkthemethod: What this setting controls is which timezone database records use when they are created and updated. If you set the TZ to Pacific Standard, as in the example above, then any dates and times you output in your app will be displayed in PST. To offset based on the timezone of the user, look into http://api.rubyonrails.org/classes/ActiveSupport/TimeWithZone.html. A useful article: http://www.elabs.se/blog/36-working-with-time-zones-in-ruby-on-rails.

I've posted a follow-up to this tip for machines that are having trouble installing gems with native extensions: https://coderwall.com/p/p1g2kg.

Posted to Accepting the code of others over 1 year ago

Great note! Thanks for sharing. It reminds me of this thought by Pete Warden:

"Over the years I’ve developed tremendous respect for the depth of subtle requirements that have been baked into legacy applications through countless undocumented changes. When I was younger my first instinct was always to rewrite them, but after discovering by painful experience that the complexity of the old software almost always reflected the poorly-articulated complexity of the users needs, I learned to love shims like these." (http://petewarden.com/2013/10/22/five-short-links-54)

I second that! Thanks for taking the time to post.

Achievements
471 Karma
77,075 Total ProTip Views