Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Dan Barry's latest activity

Monday, October 13 2008
879 Finding the days/weeks/months/years between two dates was updated in Ruby on Rails
  • Dan Barry
    Dan Barry commented at 3:04 AM

    I've attached a patch that could add this to ActiveSupport.

    I don't see a way to multiply a duration by an integer, so I can't apply an optimization similar to ...

1189 validates_length_of does not work with UTF8 chars was updated in Ruby on Rails
Sunday, October 12 2008
942 ActiveResource time changed was updated in Ruby on Rails
  • Dan Barry
    Dan Barry commented at 10:51 PM

    There has been a whole bunch of time zone magic added in Rails 2.1, so you may want to consider upgrading to take advantage of this. Geoff's article about this ...

652 Stack error with Hash.to_json for nested number values was updated in Ruby on Rails
  • Dan Barry
    • Tag changed from 2.1, activesupport, bug to 2.1, activesupport, bug
    by Dan Barry at 9:42 PM

    I wrote a unit test for this that passed on edge rails, so it looks like this has been fixed already.

Wednesday, May 07 2008
105 Assigning strings with timezone information to timezone aware attributes stri... was updated in Ruby on Rails
  • Dan Barry
    Dan Barry commented at 8:42 PM

    Geoff,

    While I'm not sure whether someone would expect a string without an explicit time zone to be interpreted as UTC or the time zone set in Time.zone, I th...

Tuesday, May 06 2008
105 Assigning strings with timezone information to timezone aware attributes stri... was updated in Ruby on Rails
  • Dan Barry
    Dan Barry commented at 5:50 PM

    The newly attached patch interprets strings without time zone information as being in the current time zone.

  • Dan Barry
    Dan Barry commented at 4:30 PM

    I just realized that strings without specified time zones are interpreted as being in UTC. While one could theoretically just use Time.zone.parse, it defeats t...

  • Dan Barry
    Dan Barry commented at 2:57 AM

    I noticed a problem with DST due to TimeZone not knowing which period it is in. This has been fixed in the new patch (as well as the tests using time zones fro...

  • Dan Barry
    Dan Barry commented at 12:00 AM

    I've attached a new patch that works when the machine's clock is set to a different time zone than Time.zone.

Monday, May 05 2008
105 Assigning strings with timezone information to timezone aware attributes stri... was updated in Ruby on Rails
  • Dan Barry
    Dan Barry commented at 4:53 PM

    These tests only pass if your computer's clock is set to the same time zone as Time.zone is set to in the test. Change your computer's clock to any other time ...