Forum: Ruby on Rails to_formatted_s(:rfc822) doesn't work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
81194a50c0f9bd95d7832a77fdf371bd?d=identicon&s=25 CSN (Guest)
on 2006-01-24 04:49
(Received via mailing list)
I do '@item.datetime.to_formatted_s(:rfc822)' and it
outputs:

2003-08-06T04:12:00-0600

':db' doesn't work either, but ':short' does. How can
I output rfc822 without actually putting all that
awful % code in my templates? I've also tried this in
environment.rb, but it still doesn't work:

ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(:rfc822
=> "%a, %d %b %Y %H:%M:%S %z")

Also, why does strftime() work, but not rfc822()?

thanks
csn

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
This topic is locked and can not be replied to.