
Command: strftime
Convert the time from UNIX time_t convention into a more
human readable format using the C library call strftime().
strftime UNIX_time [format]
- UNIX_time gives the time to be converted in time_t
convention (seconds since start of 1970).
- The optional argument format defines the output format
in strftime()-like syntax. It defaults to
"e;%c"e;. A format string consists of zero or more
directives and ordinary characters. All ordinary characters are copied
unchanged into the array. Each directive is replaced by appropriate
characters as described in the following list:
- %a Locale's abbreviated weekday name.
- %A Locale's full weekday name.
- %b Locale's abbreviated month name.
- %B Locale's full month name.
- %c Locale's date and time representation.
- %d Day of month as a decimal number (01-31).
- %D Date (%m/%d/%y).
- %h Locale's abbreviated month name.
- %H Hour as a decimal number (00-23).
- %I Hour as a decimal number (01-12).
- %j Day of year (001-366).
- %m Number of month (01-12).
- %M Minute number (00-59).
- %n Newline character.
- %p Locale's equivalent to AM or PM.
- %r Time in AM/PM notation.
- %S Second number (00-59).
- %t Tab character.
- %T Time (%H/%M/%S).
- %U Week number (00-53), Sunday as first day of week.
- %w Weekday number (0[Sunday]-6).
- %W Week number (00-53), Monday as first day of week.
- %x Locale's date representation.
- %X Locale's time representation.
- %y Year without century (00-99).
- %Y Year with century.
- %Z Timezone name, no characters if no timezone.
- Return value: The readble time string.
Note:The length of the result is limitted to 127 characters.
See also:
Previous
Up
This page is maintained by
pink@hermes.desy.de;
last modification: Jun 23 1995 .