[Mulgara-dev] XSD dateTimes

Paul Gearon gearon at ieee.org
Sat Nov 17 04:35:06 UTC 2007


> From: Edwin Shin <>
> Date: 13 November 2007 16:18
>
> It's with an odd sense of deja vu that I find myself looking at
> SPDateTimeImpl again. Is there a reason *not* to have the dateTimes
> include timezone information?
>
> 1) According to
> http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dateTime-canonical-representation
> "All timezoned dateTime values are UTC."
> 2) According to
> http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html "the Date
> class is intended to reflect coordinated universal time (UTC)"
<snip/>

This reminds me that we still have an outstanding bug with datetimes.
This was shown up when a set of times which had been encoded without a
timezone were inserted, and those times were presumed to be local.
The problem was that some of the datetimes went over the daylight
savings transition, and were invalid times (appearing in that
nonexistent hour after 2am).

We worked out how to fix this.... and then never did it.
<embarrassment intensity="severe"/>

While you're putting everything into UTC, we should re-write
comparators for SPDateTimes to compare the longs directly.  The
current implementation creates SPDateTimes over and over, calculating
julian days and all that guff that is not needed for a simple
comparison.  It makes date ranges horribly slow.

So my vote is to make the proposed changes... and while you're at it
you can fix up all the other problems too  ;-)  (I'd really appreciate
this!)

Regards,
Paul



More information about the Mulgara-dev mailing list