This project is archived and is in readonly mode.

#1796 ✓resolved
Levin Alexander

TimeWithZone#to_formatted_s drops timezone information

Reported by Levin Alexander | January 26th, 2009 @ 03:00 PM | in 2.x

ActiveSupport::TimeWithZone#to_formatted_s drops timezone information in the created string.

>> require 'active_support/version'; ActiveSupport::VERSION::STRING
=> "2.2.2"
>> = "Canberra"
=> "Canberra"
=> "1998-01-19 07:10:12 +1100"  # correct
=> "Mon Jan 19 07:10:12 UTC 1998"  # wrong

on the Time class #to_s and #to_formatted_s are documented to be aliases, so this behaviour was suprising to me.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by