This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18452 - Canonical datetime representation with fixed timezone needed
Summary: Canonical datetime representation with fixed timezone needed
Status: NEW
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: Future
Hardware: All Linux
: P2 enhancement
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-31 18:24 UTC by David Booth
Modified: 2012-08-01 14:57 UTC (History)
3 users (show)

See Also:


Attachments

Description David Booth 2012-07-31 18:24:34 UTC
The current (1.1) canonical forms for datetime and datetimeStamp meet requirements for one kind of use case, in which timezone distinctions are semantically significant.  (In essence, with datetimeStamp, provenance information is being encoded into the literal form of the datetime representation in the timezoneFrag.)

However, there are many use cases in which the timezone provenance is not needed.  And in these use cases, variability in the timezoneFrag makes it unnecessarily difficult to compare datetimes for equality (or greater-than or less-than), because it forces the comparison function to be datatype aware instead of being able to perform a simple string comparison.  In particular, an implementation is forced to parse apart the datetime components and perform datetime arithmetic to add in the timezone offset.

These use cases could be addressed by defining an additional canonical form consisting of the datetimeStamp type in which the timezoneFrag is required to be "Z".

Please note that I am not asking for the existing canonical form to be *changed* to meet this requirement.  Those forms are important for other use cases.  I am asking for an *additional* canonical form to be defined.
Comment 1 Michael Kay 2012-08-01 09:27:53 UTC
Surely it's easy enough to constrain the timezone to be Z by using a pattern or an assertion? (A pattern if you literally want "Z", an assertion if you are also prepared to accept "+00:00" as equivalent).
Comment 2 David Booth 2012-08-01 13:18:37 UTC
Yes, it would be easy enough to do.  The point is to have a *standard* so that anyone or any other spec can point to it and all applications that use datetimes only to represent points in time can use the *same* literal format.
Comment 3 Michael Kay 2012-08-01 13:35:10 UTC
Well, I don't think there will be any opportunity any time in the next five years to add new types to the base specification, however strong the case. So I'd suggest you find some other vehicle for this "standard". I think people are going to have to get used to the idea that if a type can be defined using the primitives in the XSD spec, then it can be standardized elsewhere without a change to the core language.
Comment 4 Liam R E Quin 2012-08-01 14:57:59 UTC
As staff contact at W3C for XML Schema I'll note that the Schema Working Group is not able to take on new work right now.

However, W3C does have Community Groups that anyone could join, so it's possibly a community coup could publish a draft, and conceivable the Schema Working Group could then publish that as a Working Group Note.

See http://www.w3.org/community/

Liam (XML Activity Lead at W3C)