Geeking out again… :-(

Got all geeked out about two things today… One was a really strange bug on my Mac’s version of Rails… Had to patch the rails time.rb and conversions.rb to get it all worked out. If get an error that looks something like:

NoMethodError: private method `to_date’ called for Sun Jun 22 21:02:51 +0800 2008:Time

Then, you’ll need to patch Rails (or upgrade) in Rails Changeset 6099.

Second, I’ve been wanting to improve the way online times/dates are handled, and known this can be done via Javascript and storing times in UTC, but hadn’t see how easy this is. Just take a look at TheRailsWay.com’s “scribbish.js” file. The functions you’re interested in are:

  • show_dates_as_local_time
  • get_local_time_for_date
  • distance_of_time_in_words

One thought on “Geeking out again… :-(”

Leave a Reply

Your email address will not be published. Required fields are marked *