diff options
author | Levin Alexander <mail@levinalex.net> | 2009-01-26 16:10:41 +0100 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2009-02-08 11:36:57 -0600 |
commit | 18d636934492fd657a67dc980b8556bcf69a818d (patch) | |
tree | 735baa95e08330d791511ec112c4d70fe36461d1 /activesupport/lib | |
parent | 5fbacde2afc8ce25a65fdd084166d76c23c969c3 (diff) | |
download | rails-18d636934492fd657a67dc980b8556bcf69a818d.tar.gz rails-18d636934492fd657a67dc980b8556bcf69a818d.tar.bz2 rails-18d636934492fd657a67dc980b8556bcf69a818d.zip |
Make TimeWithZone#to_formatted_s an alias to TimeWithZone#to_s [#1796 state:resolved]
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 1a59b2a08d..73aafc6ad3 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -155,6 +155,7 @@ module ActiveSupport "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s format end end + alias_method :to_formatted_s, :to_s # Replaces <tt>%Z</tt> and <tt>%z</tt> directives with +zone+ and +formatted_offset+, respectively, before passing to # Time#strftime, so that zone information is correct |