Task #11347 (new)
Opened 11 years ago
Last modified 11 years ago
Bug: Extend timestamp precision to nanoseconds
Reported by: | rleigh | Owned by: | rleigh |
---|---|---|---|
Priority: | minor | Milestone: | Unscheduled |
Component: | Bio-Formats | Version: | 5.0.0-beta1 |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
With the switch to joda time, the Timestamp resolution is milliseconds. It's not possible to use any of the standard classes to deal with xsd:dateTime subsecond parsing higher than ms resolution.
To do this will require:
- extending Timestamp to contain both joda DateTime? and nanosecond (as an integer) components
- splitting out the subsecond part of the timestamp string and parsing it separately; the DateTime? parsing will never deal with subsecond time.
- when converting to a string, it will have to be split up, have the nanosecond part added back, and then reformed with the timezone offset added to the end.
Due to needing to have a concrete type to contain the subsecond fraction, and to do the appropriate calculations when processing it, we do need to store this with fixed precision. nanoseconds means it can be stored easily in an integer; we can provide convienience methods to get/set milli/microseconds.