Typo TimeZones

One minor annoyance that I’ve noticed since I started using typo is that the times are out by about 8 hours. For instance, this post probably says “created 8 hours ago”, even though I created it only a few minutes ago. Looking at the previous post in the database, which has never been edited:

created_at     | 2006-01-24 00:29:00
updated_at     | 2006-01-24 08:52:04

The updated_at field is correct.

So now I have to figure out which of the many components is defaulting to Eastern Standard Time. Could it be Ruby? Rails? PostgreSQL? Apache? JavaScript? Safari? Who knows, I have to go to work now…

Update: It turns out that HowtoSetDefaultTimeZone has the answer. Put this into config/environment.rb:

ActiveRecord::Base.default_timezone = :utc