This project is archived and is in readonly mode.
ActiveSupport DateTime and Date conversions xmlschema method returns the wrong format for UTC times
Reported by amanfredi (at gmail) | March 2nd, 2010 @ 08:01 PM
t = Time.parse('Apr 1, 2020')
=> Wed Apr 01 00:00:00 +0000 2020
t.class => Time
t2 = t + 20.years
=> Sun, 01 Apr 2040 00:00:00 +0000
t2.class => DateTime
t.utc.xmlschema => "2020-04-01T00:00:00Z"
t2.utc.xmlschema => "2040-04-01T00:00:00+00:00"
Comments and changes to this ticket
-
Jeremy Kemper March 29th, 2010 @ 07:22 AM
- State changed from new to invalid
Z is shorthand for zero offset, so +00:00 is equivalent. We rely on underlying Ruby strftime %Z.
-
amanfredi (at gmail) March 29th, 2010 @ 03:20 PM
It is equivalent in meaning but invalid according to ISO 8601.
-
Jeremy Kemper March 29th, 2010 @ 04:49 PM
It's valid according to http://www.ietf.org/rfc/rfc3339.txt
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>