From 18d636934492fd657a67dc980b8556bcf69a818d Mon Sep 17 00:00:00 2001 From: Levin Alexander Date: Mon, 26 Jan 2009 16:10:41 +0100 Subject: Make TimeWithZone#to_formatted_s an alias to TimeWithZone#to_s [#1796 state:resolved] --- activesupport/lib/active_support/time_with_zone.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support') 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 %Z and %z directives with +zone+ and +formatted_offset+, respectively, before passing to # Time#strftime, so that zone information is correct -- cgit v1.2.3