[
https://issues.apache.org/jira/browse/OLINGO-657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Bolz resolved OLINGO-657.
---------------------------------
Resolution: Fixed
> Milliseconds in DateTime data type
> ----------------------------------
>
> Key: OLINGO-657
> URL: https://issues.apache.org/jira/browse/OLINGO-657
> Project: Olingo
> Issue Type: Question
> Components: odata2-core
> Affects Versions: V2 2.0.3
> Reporter: M Carissimi
> Assignee: Michael Bolz
>
> Hello,
> we need to represent DateTime properties with milliseconds. I understand that
> OData V2 supports the use of this using the format
> datetime’yyyy-mm-ddThh:mm[:ss[.fffffff]]’.
> In our code, a start date time of 11/May/2015 12:15:10.140 (i.e. with
> milliseconds value of 140) is rendered as
> {code}
> <d:START_DATETIME
> m:type="Edm.DateTime">2015-05-11T12:15:10.14</d:START_DATETIME>
> {code}
> When we receive a request for an entry with key parameter
> START_DATETIME=datetime'2015-05-11T12:15:10.14', this is incorrectly parsed
> in Java because the format {{yyyy-MM-dd'T'hh:mm:ss.SSS}} returns the value
> *014* instead of *140* for milliseconds.
> Is there a way to ensure our entries use 3 digits for milliseconds so that we
> get:
> {code}<d:START_DATETIME
> m:type="Edm.DateTime">2015-05-11T12:15:10.14</d:START_DATETIME>
> {code}
> Alternatively, does Olingo provide utility classes to convert a datetime()
> String entry into a Java Date or Calendar?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)