Date (Unix) - Setting The Date

Setting The Date

The XSI extension to the SUS specifies that the date command can also be used to set the date. The new date is specified as an option to date in the format MMddhhmmyy], where MM specifies the two-digit numeric month, dd specifies the two-digit numeric day, hh specifies the two-digit numeric hour, mm specifies the two-digit numeric minutes. Optionally cc specifies the first two digits of the year, and yy specifies the last two digits of the year.

The date command from GNU Coreutils (often used on Linux) allows another method with a different format, for example to set the date and time to September 8, 2004 01:22:

date --set="20040908 01:22"

Read more about this topic:  Date (Unix)

Famous quotes containing the words setting and/or date:

    “should some limb of the devil
    Destroy the view by cutting down an ash
    That shades the road, or setting up a cottage
    Planned in a government office, shorten his life,
    Manacle his soul upon the Red Sea bottom.”
    —William Butler Yeats (1865–1939)

    “Until I was twenty-five, I had no development at all. From my twenty-fifth year I date my life. Three weeks have scarcely passed, at any time between then and now, that I have not unfolded within myself. But I feel that I am now come to the inmost leaf of the bulb, and that shortly the flower must fall to the mould.”
    —Herman Melville (1819–1891)