diff options
author | Xavier Noria <fxn@hashref.com> | 2010-07-26 00:23:57 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-07-26 00:23:57 +0200 |
commit | 6aa12535881e00f156cf7ddacaba123ed181e015 (patch) | |
tree | 9a845318d1b41d1482304eafa235edd60ac7bd41 /activesupport/lib/active_support/time_with_zone.rb | |
parent | df95948d455b3a5f75fc01d41375dcd840549633 (diff) | |
parent | 7fb7a2bd69b86ee0a0e832f597f11d8cc1c787c9 (diff) | |
download | rails-6aa12535881e00f156cf7ddacaba123ed181e015.tar.gz rails-6aa12535881e00f156cf7ddacaba123ed181e015.tar.bz2 rails-6aa12535881e00f156cf7ddacaba123ed181e015.zip |
Merge remote branch 'docrails/master'
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 62d02bdeb6..ad6c3de1f5 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -5,9 +5,9 @@ module ActiveSupport # A Time-like class that can represent a time in any time zone. Necessary because standard Ruby Time instances are # limited to UTC and the system's <tt>ENV['TZ']</tt> zone. # - # You shouldn't ever need to create a TimeWithZone instance directly via <tt>new</tt> -- instead, Rails provides the methods - # +local+, +parse+, +at+ and +now+ on TimeZone instances, and +in_time_zone+ on Time and DateTime instances, for a more - # user-friendly syntax. Examples: + # You shouldn't ever need to create a TimeWithZone instance directly via <tt>new</tt> . Instead use methods + # +local+, +parse+, +at+ and +now+ on TimeZone instances, and +in_time_zone+ on Time and DateTime instances. + # Examples: # # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' # Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45 EST -05:00 @@ -18,7 +18,8 @@ module ActiveSupport # # See Time and TimeZone for further documentation of these methods. # - # TimeWithZone instances implement the same API as Ruby Time instances, so that Time and TimeWithZone instances are interchangeable. Examples: + # TimeWithZone instances implement the same API as Ruby Time instances, so that Time and TimeWithZone instances are interchangeable. + # Examples: # # t = Time.zone.now # => Sun, 18 May 2008 13:27:25 EDT -04:00 # t.hour # => 13 @@ -113,8 +114,8 @@ module ActiveSupport end alias_method :iso8601, :xmlschema - # Coerces the date to a string for JSON encoding. The default format is ISO 8601. You can get - # %Y/%m/%d %H:%M:%S +offset style by setting ActiveSupport::JSON::Encoding.use_standard_json_time_format + # Coerces time to a string for JSON encoding. The default format is ISO 8601. You can get + # %Y/%m/%d %H:%M:%S +offset style by setting <tt>ActiveSupport::JSON::Encoding.use_standard_json_time_format</tt> # to false. # # ==== Examples |