POSIX time format

From FreeBSDwiki
(Redirected from POSIX time)
Jump to: navigation, search

In POSIX time format, the timestamp should be in the form [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the following:

CC      The first two digits of the year (the century).
YY      The second two digits of the year.
MM      The month of the year, from 1 to 12.
DD      the day of the month, from 1 to 31.
hh      The hour of the day, from 0 to 23.
mm      The minute of the hour, from 0 to 59.
SS      The second of the minute, from 0 to 59.

If the CC and YY letter pairs are not specified, the values default to the current year. If the SS letter pair is not specified, the value defaults to 0.


10:00 AM on Aug 23 2004: 200408231000
11:30 PM on Sep 01 2006: 200609012330
12:00 PM on this Oct 09: 10091200

Some utilities which require POSIX time, such as the at scheduler, will also understand a time specified with no date at all; or may understand esoteric keywords such as now, noon, midnight, etc. But none of those are actually part of the POSIX time standard; the standard itself requires month, day, hour, and minutes, with century, year, and seconds optional.

Personal tools