Legal Date Formats
The legal time and date formats for CVS are defined by the ISO 8601 standard and RFC 822 as amended by RFC 1123. Other formats can be interpreted, but CVS is designed to handle only these standards.
ISO 8601
The basic ISO 8601 date format is as follows:
year-month-day hours:minutes:seconds
All values are numbers with leading zeros to ensure that the
correct number of digits are used. Hours are given in 24-hour
time. This produces the structure YYYY-MM-DD HH:MM:SS, which is
internationally acceptable and can be sorted easily. You can use a
date, a time, or both.
If you’re using ISO 8601 format with the hyphens, the full
date is required in CVS. The YYYYMMDD date format is also acceptable
and can be abbreviated to YYYYMM or YYYY.
The HH and HH:MM time formats are acceptable. Times
can also be specified without the colon, so HHMMSS or HHMM are usable.
Warning
Be aware that HHMM may
be misinterpreted as YYYY.
Get into the habit of using separators.
In strict ISO 8601 format, a T is required between the date and the
time, but CVS understands this format with or without the T. The ISO 8601 standard also states
that a Z at the end of the
string designates UTC (Universal Coordinated Time), but CVS does
not recognize the use of Z.
RFC 822 and RFC 1123
RFCs 822 and 1123 define a precise time format:
[DDD,]DD MMM YYYY HH:MM[:SS]ZZZ
These are the terms in the format:
|
|
A three-letter day of the week. |
|
|
A two-digit date of the month. |
|
|
A three-letter month. |
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access