aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-10-04 07:58:45 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-10-04 07:58:45 -0600
commiteee2aa31a6d0f56173f4b77fde0525bd6bdee1e5 (patch)
treec8ca31a144d947409a4e6447a2431194cc798613 /activesupport/lib/active_support/core_ext/time
parent0e27ad35259b634d929e30d6d7bb4f66ef3d9fa9 (diff)
parentb15e8dfd742a4d38d29e3286bdbfb2299d4ce92b (diff)
downloadrails-eee2aa31a6d0f56173f4b77fde0525bd6bdee1e5.tar.gz
rails-eee2aa31a6d0f56173f4b77fde0525bd6bdee1e5.tar.bz2
rails-eee2aa31a6d0f56173f4b77fde0525bd6bdee1e5.zip
Merge pull request #21863 from tanmay3011/use_applications_year
Use #current instead of #now to prevent zone issues and use new ruby …
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time')
-rw-r--r--activesupport/lib/active_support/core_ext/time/calculations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb
index ce2dbfb29d..e403289715 100644
--- a/activesupport/lib/active_support/core_ext/time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/time/calculations.rb
@@ -18,7 +18,7 @@ class Time
# Returns the number of days in the given month.
# If no year is specified, it will use the current year.
- def days_in_month(month, year = now.year)
+ def days_in_month(month, year = current.year)
if month == 2 && ::Date.gregorian_leap?(year)
29
else