personium / personium-core

Core module of Personium
https://personium.io
Apache License 2.0
88 stars 16 forks source link

DateTime literal format used in OData $filter is not implemented correctly. #86

Closed shimono closed 6 years ago

shimono commented 6 years ago

DateTime literal format used in OData $filter is not implemented correctly.

Problem

Current implementation recognizes DateTime literals in the form of Unix Time as described in below reference: https://personium.github.io/en/apiref/1.5.6/403_Filter_Query.html

OData v2.0 spec states Date Time literals in URL should be denoted in the form such as:

datetime'2017-12-12T14:59:33.123'

As defined in the following reference: http://www.odata.org/documentation/odata-version-2-0/overview/#AbstractTypeSystem

Remedy

Personium-core should accept both of the following formats in order to be compliant with the OData spec and to keep the backward compatibility.

Additional Consideration

All of the following DateTime literals should be accepted

datetime'2017-12-12T14:59' datetime'2017-12-12T14:59:33' datetime'2017-12-12T14:59:33.1' datetime'2017-12-12T14:59:33.123' datetime'2017-12-12T14:59:33.123+900'

SawamiWataru commented 6 years ago

Solved in v1.5.7.

SawamiWataru commented 6 years ago

Since the implementation of the test has not yet been completed, reopen.

shimono commented 6 years ago

I guess this issue should be closed.

SawamiWataru commented 6 years ago

Solved in v1.5.8.