2008/7/7 <>:
> Thinking out loud here.
>
> My main concern is that functions like HOUR()and MINUTE() which extract the
> hour or minute value from a datetime value are unambiguous.
No, they are ambiguous as to TZ.
Anything beyond that is a presumption.
>
> ISO 8601 states that the notation "18:30:00" expresses local time. You can
> make it expressly UTC by writing "18:30:00Z". Similarly, you can give a
> specific time zone offset by writing "18:30:00+05". Each of this notations
> can be combined with dates to give strings like "2008-12-24T18:30:00+05".
>
> So if we merely leave it as-is, then the date/time values are stored in
> local time, in an application-dependent fashion, in what may be a time-zone
> dependent fashion as well. That is how the spec reads to me now.
That's one interpretation.
>
> But I don't think implementations work that way. If I enter the NOW()
> function into a spreadsheet in Boston, and at the same instant someone
> enters NOW() into a spreadsheet in London, we do not see the equivalent
> times recorded. We each record our local times, without specifying a time
> zone.
Fine if Boston users never communicate with London users.
They do.
That' the interop problem.
http://www.w3.org/TR/xpath-functions/#func-current-dateTime
provides a reasonably comprehensive set of thought out datetime functions.
regards
-
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk