Schema Central > XML Schema 1.1 > xsd:time
Advanced search
Need XML Help?

Recommended Reading:

Definitive XML Schema

 

Web Service Contract Design and Versioning for SOA

 

Advanced XML Applications

 

xsd:time

The type xsd:time represents a time of day in the format hh:mm:ss.sss where hh represents the hour, mm the minutes, and ss.sss the seconds. An unlimited number of additional digits can be used to increase the precision of fractional seconds if desired. The time is based on a 24-hour time period, so hours should be represented as 00 through 24. Either of the values 00:00:00 or 24:00:00 can be used to represent midnight.

An optional time zone expression may be added at the end of the value. The letter Z is used to indicate Coordinated Universal Time (UTC). All other time zones are represented by their difference from Coordinated Universal Time in the format +hh:mm, or -hh:mm. These values may range from -14:00 to 14:00. For example, US Eastern Standard Time, which is five hours behind UTC, is represented as -05:00. If no time zone value is present, it is considered unknown; it is not assumed to be UTC.

Simple Type Information

Namespace: http://www.w3.org/2001/XMLSchema

Schema Document: builtintypes.xsd

Content

Examples

Valid valuesComment
13:20:001:20 PM
13:20:30.55551:20 PM and 30.5555 seconds
13:20:00-05:001:20 PM, US Eastern Standard Time
13:20:00Z1:20 PM, Coordinated Universal Time (UTC)
00:00:00midnight
24:00:00midnight
Invalid valuesComment
5:20:00hours, minutes, and seconds must be two digits each
13:20seconds must be specified, even if it is 00
13:20.5:00values for hours and minutes must be integers
13:65:00the value must be a valid time of day
an empty value is not valid, unless xsi:nil is used

Type Inheritance Chain

Site developed and hosted by Datypic, Inc.

Please report errors or comments about this site to contrib@functx.com