Copyright © 2001-2005 Oren Ben-Kiki, Clark Evans, Brian Ingerson
Status
This specification is a draft reflecting consensus reached by members of the yaml-core mailing list. Any questions regarding this draft should be raised on this list.
URI:
tag:yaml.org,2002:timestamp
Shorthand:
!!timestamp
Kind:
Scalar.
Canonical:
[0-9][0-9][0-9][0-9] # (year) -[0-9][0-9] # (month) -[0-9][0-9] # (day) T[0-9][0-9] # (hour) :[0-9][0-9] # (minute) :[0-9][0-9] # (second) (\.[0-9]*[1-9])? # (fraction) Z # (time zone)
Regexp:
[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] # (ymd) |[0-9][0-9][0-9][0-9] # (year) -[0-9][0-9]? # (month) -[0-9][0-9]? # (day) ([Tt]|[ \t]+)[0-9][0-9]? # (hour) :[0-9][0-9] # (minute) :[0-9][0-9] # (second) (\.[0-9]*)? # (fraction) (([ \t]*)Z|[-+][0-9][0-9]?(:[0-9][0-9])?)? # (time zone)
Definition:
A point in time.
A timestamp value represents a single point in time. This can be serialized using a subset of the ISO8601 format and the formats proposed by the W3C note on datetime. In addition, a more relaxed format is also supported for enhanced readability, using white space separation.
If the time zone is omitted, the timestamp is assumed to be
specified in UTC. The time part may be omitted altogether,
resulting in a date format. In such a case, the time part is
assumed to be 00:00:00Z
(start of day, UTC).