I am using Rails 3.0.4, Ruby 1.9.2p0 on a Mac. When using Sqlite as the default database and the successfully added response_to: xml function, I see that the datetime format in xml is something like:
<updated-at type="datetime">2011-03-20T12:15:47Z</updated-at>
Although there are several messages on the Internet (also here) in which you can set the date / time format, for example, using the configuration in config / locale / en.yml or add
Time::DATE_FORMATS[:default] = "%Y-%m-%d %H:%M:%S"
in the initialization file do not work.
I think the problem is that when I call someobj.to_xml, for datetime objects, the rails will call
datetime.xmlschema
instead of calling
datetime.to_s
which bypass the settings mentioned above. Although I know that this can be a criminal, I do not know how to fix it. Who has experience? Many thanks!