DATE(1) HP-UX 5.0 DATE(1) NAME date - print and set the date SYNOPSIS date [ [yy]mmddhhmm ] [ +format ] HP-UX COMPATIBILITY Level: HP-UX/NUCLEUS Origin: System V Native Language Support: 8-bit data, customs, messages DESCRIPTION If no argument is given, or if the argument begins with +, the current date and time are printed. Otherwise, the current date is set. yy is the last two digits of the year number; 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. The year, month, and day may be omitted, the current values being the defaults. For example: date 10080045 sets the date to Oct 8, 12:45 AM in the current year. The system operates in GMT. Date takes care of the conversion to and from local standard and daylight time. Attempting to set the date backwards generates a warning, and requires an extra confirmation from the (super-)user. If the argument begins with +, the output of date is under the control of the user. The format for the output is similar to that of the first argument to printf(3S). Numeric 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 encoded by %%. All other characters are copied to the output without change. The string is always terminated with a new-line character. Date writes an accounting record on the file /usr/adm/wtmp. Field Descriptors: n insert a new-line 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 - 00 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 Julian date - 001 to 366 w day of week - Sunday = 0 a abbreviated weekday name - Sun to Sat W full weekday name - Sunday to Saturday h abbreviated month name - Jan to Dec F Full month name - January to December r time in AM/PM notation z time zone name from TZ variable in user's environment The full or abbreviated month name and full or abbreviated weekday name are spelled according to user's native language as defined by his LANG variable (see environ(7)). If there is no argument the current date and time are printed according to the D_T_FMT string (see langinfo(3C)) which corresponds to the current value of the variable LANG in the user's environment. If the LANG variable is not set ctime(3C) is used to format the date. EXAMPLE date '+DATE: %m/%d/%y%nTIME: %H:%M:%S' would generate as output: DATE: 08/01/76 TIME: 14:45:05 FILES /usr/adm/wtmp SEE ALSO ctime(3C), langinfo(3C), environ(7). DIAGNOSTICS No permission if you aren't the super-user and you try to change the date; bad conversion if the date set is syntactically incorrect; bad format character if the field descriptor is not recognizable.