Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #2509 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Incorrect handling of daylight savings time support with Fixnum.since

Reported by: jsolson@damogran.org Assigned to: David
Priority: normal Milestone:
Component: ActiveSupport Version: 0.13.1
Severity: normal Keywords: time since ago from_now
Cc:

Description

Calling 1.day.since(Time) with a time argument of October 30th, 00:00:00 returns October 30th, 23:00:00.

While this might be the expected behavior for a Ruby Time object (since adding 86400 seconds to October 30th, 00:00:00 would leave you at October 30th, 23:00:00), this is likely not the bahvior Rails developers are expecting. Either way, some note should be made in the documentation regarding the behavior, since it's likely that someone will be confused by it.

Change History

10/18/05 16:28:09 changed by bitsweat

  • keywords set to time since ago from_now.
  • severity changed from minor to enhancement.

The ActiveSupport time extensions docs should be clearer about the fact that it's for rough estimations and is not meant to be exact.

11/02/06 01:52:13 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [5388]) next_week respects DST changes. Closes #5617, closes #2353, closes #2509, references #4551.