mad.ly rails, jquery, flash, etc    about »

We're looking for senior developer. More Info

Posts Tagged time zones

Making Rails time zone aware attributes and Chronic play well together

I came up with this monkeypatch to Time.zone.parse, so that it uses the Chronic time parsing library instead of Time.parse:

class ActiveSupport::TimeZone
  # requires technoweenie’s fork of the Chronic time parsing library
  # http://github.com/technoweenie/chronic/tree/master
  def parse(str)
    Chronic.time_class = self
    Chronic.parse(str, :now => now)
  end
end
…with this in place, I can assign natural language date/time strings [...]


Two fixes to ActiveSupport::TimeWithZone

Last night, I pulled in two fixes to the ActiveSupport::TimeWithZone class to the Rails 2-1-stable branch:


Rails 2.1 Time Zone Support: An Overview

A Portuguese translation of this article can be found here.
This will be the first of several posts I’ll create about the new time zone features in the upcoming Rails 2.1 release. In this post, I’ll give an overview of the new features, by walking through the setup of a new app.
I’ll start with a fresh [...]


Time Zone Visualizations

I’ve been doing a lot of work with time zones recently; they’re notoriously difficult to wrap one’s head around, so I created a few visualizations to help me.