Allen Walker wrote:> When i call model_object.to_xml, there is a DateTime field and
it''s
> displayed as such: 2009-08-25T16:32:06Z
>
> Is there anyway to modify the display format to say the format like
> Time.now.utc?, i.e. 2009-09-09 03:14:20 UTC
>
> thanks
Time formats in XML are standardized and Rails uses the standard. I
would highly recommend you NOT change it. The model layer should not be
responsible for date/time formats anyway. Let you views do their job.
http://www.w3.org/TR/xmlschema-2/#dateTime
--
Posted via http://www.ruby-forum.com/.