Defect #7394

non-standard date format is used by REST API

Added by Alex Last almost 9 years ago. Updated over 7 years ago.

Status:ClosedStart date:2011-01-21
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:Invalid Affected version:

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

History

#1 Updated by Alex Last almost 9 years ago

I'd suggest RFC 822 standard syntax: "-0800" instead of "-08:00".

#2 Updated by Andrey Bruggemann almost 9 years ago

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.

#3 Updated by Alex Last almost 9 years ago

anyway, it would be nice to have the same format in both Redmine 1.0 and 1.1.

#4 Updated by Jean-Philippe Lang almost 9 years ago

  • 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.

#5 Updated by Alex Last over 7 years ago

several Redmine API users have reported this bug: https://github.com/taskadapter/redmine-java-api/issues/39

I'm guessing Redmine date format was changed again?

Also available in: Atom PDF