Defect #7394
closed
non-standard date format is used by REST API
Added by Alex Last almost 14 years ago.
Updated over 12 years ago.
Description
kinda "standard" values:
Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Time zone RFC 822 time zone -0800
sample date returned by Redmine REST API for "get projects" request:
2011-01-20T18:33:29-08:00
note: there's no "GMT" prefix before the "-08:00" part
I'd suggest RFC 822 standard syntax: "-0800" instead of "-08:00".
Alexey Skor wrote:
I'd suggest RFC 822 standard syntax: "-0800" instead of "-08:00".
Use XML Schema Datetime Formats (based on ISO 8601 standard) should be better for integration, IMHO.
anyway, it would be nice to have the same format in both Redmine 1.0 and 1.1.
- Status changed from New to Closed
- Resolution set to Invalid
This is how Rails writes datetimes in XML.
See activesupport-2.3.5\lib\active_support\core_ext\date_time\conversions.rb
:
# Converts datetime to an appropriate format for use in XML
def xmlschema
strftime("%Y-%m-%dT%H:%M:%S%Z")
end if RUBY_VERSION < '1.9'
And it doesn't seem non-standard at all: http://www.w3.org/TR/xmlschema-2/#dateTime.
Also available in: Atom
PDF