This project is archived and is in readonly mode.

#5607 ✓resolved
Prem Sichanugrist (sikachu)

Use `Time.current` in AS::CoreExtensions::Numeric::Time to maintain consistency with AS::Duration

Reported by Prem Sichanugrist (sikachu) | September 10th, 2010 @ 04:56 PM | in 2.3.10

Hi,

After I was investigate with #4076, I found out that ago and since in ActiveSupport::CoreExtensions::Numeric::Time was actually using Time.now when user doesn't specify the time. However, I found out in the old commit (http://github.com/rails/rails/commit/32b82e4c#L2L54) that Geoff Buesing has switched to use Time.current to use the time zone specified in Time.default_zone instead.

So, I have made the patches to change those two lines to use Time.current instead of Time.now to make it consistence. Please review and apply them for me.

Thank you.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>