Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ date(1) — DG/UX 4.31

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sysadm(1)

cftime(3C)

environ(5)

date(1)



     date(1)                    DG/UX 4.31                     date(1)



     NAME
          date - print and set the date

     SYNOPSIS
          date [ +fmt ]
          date mmddHHMM[[cc]yy]

          fmt  Date format (see the DESCRIPTION section)
          mm   The month number
          dd   The day number in the month
          HH   The hour number (24-hour system)
          MM   The minute number
          cc   First two digits of year number; default = 19
          yy   Last two digits of year number; default: current year's

     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 (only by super-user).

          The system operates in GMT.  date converts to and from local
          standard and daylight time (which is determined by your TZ
          environment variable - see the cftime(3C) man page).

          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).  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
          encoded by %%.  All other characters are copied to the
          output without change.  The string is always terminated with
          a new-line character.  If the argument contains embedded
          blanks, it must be quoted (see the EXAMPLES section).

          Specifications of native language translations of month and
          weekday names are supported.  The language used depends on
          the value of the environment variable LANGUAGE (see
          environ(5)).  The month and weekday names used for a
          language are taken from strings in the file for that
          language in the /lib/cftime directory (see cftime(4)).

          After successfully setting the date and time, date displays
          the new date according to the format defined in the
          environment variable CFTIME (see environ(5)).

          Date format field descriptors (must be preceded by a %):

               a    abbreviated weekday name
               A    full weekday name
               b    abbreviated month name
               B    full month name



     Licensed material--property of copyright holder(s)         Page 1





     date(1)                    DG/UX 4.31                     date(1)



               d    day of month - 01 to 31
               D    date as mm/dd/yy
               e    day of month - 1 to 31 (single digits are preceded
                    by a blank)
               h    abbreviated month name (alias for %b)
               H    hour - 00 to 23
               I    hour - 01 to 12
               j    day of year - 001 to 366
               m    month of year - 01 to 12
               M    minute - 00 to 59
               n    insert a new-line character
               p    string containing ante-meridiem or post-meridiem
                    indicator (by default, AM or PM)
               r    time as HH:MM:SS pp where pp is the ante-meridiem
                    or post-meridiem indicator (by default, AM or PM)
               R    time as HH:MM
               S    second - 00 to 59
               t    insert a tab character
               T    time as HH:MM:SS
               U    week number of year (Sunday as the first day of
                    the week) - 01 to 52
               w    day of week - 0 to 6 (Sunday = 0)
               W    week number of year (Monday as the first day of
                    the week) - 01 to 52
               x    Country-specific date format
               X    Country-specific time format
               y    year within century - 00 to 99
               Y    year as YYYY (4 digits)
               Z    timezone name

     EXAMPLES
               date 10080045

          sets the date to Oct 8, 12:45 a.m.

               date '+DATE: %m/%d/%y%nTIME: %H:%M:%S'

          would have generated as output:

          DATE: 08/01/76
          TIME: 14:45:05

     FILES
          /dev/kmem

     SEE ALSO
          sysadm(1), cftime(3C), environ(5).








     Licensed material--property of copyright holder(s)         Page 2





     date(1)                    DG/UX 4.31                     date(1)



     DIAGNOSTICS
          No permission       If you are not the super-user and you
                              try to change the date.
          bad conversion      If the date set is syntactically
                              incorrect.

     NOTES
          If you need to change the date while the system is running
          multi-user, use sysadm(1) datetime.

          If you attempt to set the current date to one of the dates
          that the standard and alternate time zones change (for
          example, the date that daylight time is starting or ending),
          and you attempt to set the time to a time in the interval
          between the end of standard time and the beginning of the
          alternate time (or the end of the alternate time and the
          beginning of standard time), the results are unpredictable.






































     Licensed material--property of copyright holder(s)         Page 3



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