aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-06-22 08:27:25 +0800
committerGitHub <noreply@github.com>2016-06-22 08:27:25 +0800
commit23d15ddb46c7fc20638aa8d94ca978c8e1a0cc75 (patch)
treec856135206e311e3f5ebe30cb3b6b427628f2706 /activesupport
parent13a1110079be89b1875f44de80bec3735d243ab3 (diff)
parentb30805bd460542bbd3d8484656cf7b0fde5434d5 (diff)
downloadrails-23d15ddb46c7fc20638aa8d94ca978c8e1a0cc75.tar.gz
rails-23d15ddb46c7fc20638aa8d94ca978c8e1a0cc75.tar.bz2
rails-23d15ddb46c7fc20638aa8d94ca978c8e1a0cc75.zip
Merge pull request #25467 from aarongray/tweak_time_helpers_docs_for_time_zones
Docs: create times using the rails timezone not system timezone [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/testing/time_helpers.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb
index fca0947c5b..ef27ce8eb5 100644
--- a/activesupport/lib/active_support/testing/time_helpers.rb
+++ b/activesupport/lib/active_support/testing/time_helpers.rb
@@ -66,7 +66,7 @@ module ActiveSupport
# +Date.today+, and +DateTime.now+ to return the time or date passed into this method.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
- # travel_to Time.new(2004, 11, 24, 01, 04, 44)
+ # travel_to Time.zone.local(2004, 11, 24, 01, 04, 44)
# Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00
# Date.current # => Wed, 24 Nov 2004
# DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500
@@ -88,7 +88,7 @@ module ActiveSupport
# state at the end of the block:
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
- # travel_to Time.new(2004, 11, 24, 01, 04, 44) do
+ # travel_to Time.zone.local(2004, 11, 24, 01, 04, 44) do
# Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00
# end
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
@@ -116,7 +116,7 @@ module ActiveSupport
# `travel` and `travel_to`.
#
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
- # travel_to Time.new(2004, 11, 24, 01, 04, 44)
+ # travel_to Time.zone.local(2004, 11, 24, 01, 04, 44)
# Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00
# travel_back
# Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00