David Easley
David Easley

Reputation: 1383

Does xs:time default to UTC when time zone is omitted?

The XML schema spec seems vague on how to interpret an xs:time value when no time zone is specified. (See section 3.2.8.) Is there a common consensus on this (e.g. UTC or the local time zone)?

Upvotes: 1

Views: 779

Answers (1)

xcut
xcut

Reputation: 6349

You got close to the right point in the spec. See slightly above, under dateTime:

"Local" or untimezoned times are presumed to be the time in the timezone of some unspecified locality as prescribed by the appropriate legal authority;

Most systems I have dealt with make the local time assumption.

Upvotes: 2

Related Questions