openmicroscopy/bioformats — pull request #619 by rleigh-dundee (2013-07-31 18:45:30+00:00)
Title: xsd-fu: Improve Timestamp date handling and precision

Timestamp uses Joda Instant and DateTime internally for ISO-8601 dates

Internal timezone representation: UTC in milliseconds (Instant)
Input timezone representation: Defined in ISO-8601 string
Output timezone representation: UTC

The date handling is made reproducible and consistent by using UTC
everywhere. If it's a non-UTC date on input, we convert to UTC.

Things to check:
- now we aren't using local time, are the timestamps always correct. If local time is needed, you need to explictly convert it, e.g. back to a Date or to LocalTime.
- is conversion to and from Date and Calendar always correct? Since the timezone these represent is kind of undefined, what would be the correct behaviour? We could add explicit conversion for these types to enforce consistent behaviour.
- we could drop Date and Calandar support (in Timezone) entirely and require the user to convert
- we could additionally drop Date and Calendar support entirely from the codebase and use Joda throughout