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.

Geoff Buesing's latest activity

Thursday, January 28 2010
3476 Glitch in DateHelper with timezones (#time_ago_in_words causing "undefined me... was updated in Ruby on Rails
  • Geoff Buesing
    Geoff Buesing commented at 2:27 AM

    Turns out the standard library isn't to blame -- ActiveSupport defines DateTime#to_f, so Time#- coerces the DateTime arg #to_f and assumes we're subtracting sec...

Tuesday, January 26 2010
1821 time_zone.rb: which Georgetown? was updated in Ruby on Rails
  • Geoff Buesing
    Geoff Buesing commented at 4:08 AM

    Looking at the historical data, Buenos Aires and Georgetown, Guyana shared the same base UTC offset (-03:00) from 1975 to 1991, which is probably why Windows co...

Wednesday, December 16 2009
3579 ActiveRecord not setting/checking MySQL session variable time_zone was updated in Ruby on Rails
  • Geoff Buesing
    Geoff Buesing commented at 7:31 PM

    To answer your question about Mysql DATETIME columns: they're not affected by the Mysql time zone. From the Mysql documentation:

    "The current time zone setting ...

  • Geoff Buesing
    Geoff Buesing commented at 3:33 PM

    @Joachim: thanks for the thorough writeup.

    The issue described here with Mysql doing time zone conversions on TIMESTAMP columns. Note that TIMESTAMP columns are...

Tuesday, December 15 2009
3511 to_yaml fails for DateTime objects was updated in Ruby on Rails
Tuesday, November 10 2009
3476 Glitch in DateHelper with timezones (#time_ago_in_words causing "undefined me... was updated in Ruby on Rails
  • Geoff Buesing
    • State changed from new to open
    by Geoff Buesing at 10:22 PM

    Aha, ok, I see what the issue is -- the instance of ActiveSupport::TimeWithZone you're creating is storing the time internally as a DateTime (because you starte...

  • Geoff Buesing
    • Assigned user set to Geoff Buesing
    by Geoff Buesing at 2:36 PM

    I can't replicate this.

    With what arguments are you calling time_ago_in_words to get the error?

Tuesday, October 27 2009
3117 TimeWithZone comparison fails for distinct instances of same time was updated in Ruby on Rails
  • Geoff Buesing
    • State changed from new to invalid
    by Geoff Buesing at 2:34 AM

    Matt Jones is probably right; this looks to be an issue with the database not storing usec.

    In your tests, you can try coercing to_a before comparing; usec valu...

3037 Time.current.utc_offset and Time.zone.utc_offset are different during DST was updated in Ruby on Rails
  • Geoff Buesing
    • State changed from new to invalid
    by Geoff Buesing at 2:27 AM

    TimeZone#utc_offset (called when you call Time.zone.utc_offset) returns just the base UTC offset for the time zone; it doesn't take DST into consideration.

    This...

3410 Time - TimeWithZone fails (sometimes) was updated in Ruby on Rails
  • Geoff Buesing
    • State changed from new to invalid
    by Geoff Buesing at 2:16 AM

    The only valid settings for config.active_record.default_timezone are :utc and :local.

    I've seen others make this same error -- they assume default_timezone can...