[MDSAL-206] DOMEvent contains only event time with Date, which has insufficient precision Created: 03/Nov/16  Updated: 09/Mar/18  Resolved: 23/Feb/18

Status: Resolved
Project: mdsal
Component/s: DOM API
Affects Version/s: None
Fix Version/s: Oxygen

Type: Improvement
Reporter: Rudolf Brisuda Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks NETCONF-270 2 digits milliseconds can not be pars... Resolved

 Description   

If we want to deal with 6 digits precision at position of milliseconds, e. g. eventTime = "2015-10-23T09:42:27.200001Z", date class is insufficient. Parsing these strings causes wrong time in resulting Date object. Thus precision is only until milliseconds (2 digits).

We found solution with using LocalDateTime from Java 8 where is precision until nanoseconds but it is not supporting now.

Here is possible solution in controller:
https://git.opendaylight.org/gerrit/#/c/47845/
but it should be moved to md-sal as mentioned: "the corresponding API lives in MD-SAL."



 Comments   
Comment by Robert Varga [ 30/Jan/18 ]

I am not sure LocalDateTime is the appropriate type here – we really would like to represent these in UTC, without relying on local timezone.

Comment by Robert Varga [ 30/Jan/18 ]

https://git.opendaylight.org/gerrit/67729

Generated at Wed Feb 07 20:09:02 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.