Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ date(1) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gettimeofday(2)

stime(2)

time(2)

printf(3S)

utmp(4)




date(1) date(1)
NAME date - display and set the date SYNOPSIS date [mmddhhmm[yy]] [+format] DESCRIPTION If no argument is given, or if the argument begins with +, the current date and time are displayed. Otherwise, the current date is set. The first mm is the month number; dd is the day number in the month; hh is the hour number (24 hour system); the second mm is the minute number; and yy is the last 2 digits of the year number and is optional. If a number less than 70 is given, the year that results is 1970. For example, date 10080045 sets the date to Oct. 8, 12:45 AM. The current year is the default if no year is mentioned. The operating system operates in GMT. date takes care of the conversion to and from local standard and daylight time. If the argument begins with +, the output of date is under the control of the user. The format for the output is simi- lar to that of the first argument to printf(3S). All output fields are of fixed size (zero padded if necessary). Each field descriptor is preceded by % and will be replaced in the output by its corresponding value. A single % is encod- ed by %%. All other characters are copied to the output without change. The string is always terminated with a new- line character. Field Descriptors n insert a newline character t insert a tab character m month of year-01 to 12 d day of month-01 to 31 y last 2 digits of year-70 to 99 D date as mm/dd/yy H hour-00 to 23 M minute-00 to 59 S second-00 to 59 T time as HH:MM:SS j day of year-001 to 366 w day of week-Sunday = 0 a abbreviated weekday-Sun to Sat h abbreviated month-Jan to Dec r time in AM/PM notation April, 1990 1



date(1) date(1)
EXAMPLES The command date '+DATE: %m/%d/%y%nTIME: %H:%M:%S' generates as output DATE: 08/01/76 TIME: 14:45:05 DIAGNOSTICS No permission if you are not the superuser and you try to change the date; bad conversion if the date set is syntactically in- correct bad format character if the field descriptor is not recogniz- able FILES /bin/date /etc/wtmp to record time SEE ALSO gettimeofday(2), stime(2), time(2), printf(3S), utmp(4). WARNINGS It is bad practice to change the date while the system is running multiuser. 2 April, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026