Ticket #11 (closed enhancement: fixed)
Timezone-awareness of DATE PrimitiveValueType
|Reported by:||bruno||Owned by:||evert|
Currently the DATE PrimitiveValueType? is based on the java.util.Date class, which has no awareness of timezones.
The preferred way of storing dates (times, datetimes) is to normalize them to the UTC timezone.
We could of course take the assumption that the provided j.u.Date object is in UTC, but:
- not sure but this might be clumsy to work with in combination with other Java APIs (e.g. upon conversion to a Calendar object). In general it moves responsibility and braineffort towards the user.
- we could consider using jodatime api, see http://joda-time.sourceforge.net/
- we could consider using ISO-8601 string representation (avoid dependency on jodatime in the api, but validation of correctness of the string will happen late).
Personally leaning towards jodatime.
Also: what date/time related PrimitiveValueTypes? should we have (date, time, datetime)? Up to what precision should they work (seconds, millis) ?
- Status changed from closed to reopened
- Resolution fixed deleted