diff options
| author | Philip Paeps <philip@FreeBSD.org> | 2022-08-16 08:09:47 +0000 |
|---|---|---|
| committer | Philip Paeps <philip@FreeBSD.org> | 2022-08-16 08:09:47 +0000 |
| commit | a24d752d3e77a28c877a5319face8d00aa1b558c (patch) | |
| tree | 5ae147d3bedd850833ec5c783ea54fa4b00e6aba /date.1.txt | |
| parent | 9b5369d383baf54651be0922591eeb6263ce029d (diff) | |
Import tzcode 2022cvendor/tzcode/tzcode2022c
Diffstat (limited to 'date.1.txt')
| -rw-r--r-- | date.1.txt | 202 |
1 files changed, 91 insertions, 111 deletions
diff --git a/date.1.txt b/date.1.txt index 2910aaac370c..5affca23b2f0 100644 --- a/date.1.txt +++ b/date.1.txt @@ -1,127 +1,107 @@ -NAME +DATE(1) General Commands Manual DATE(1) - date - show and set date and time +NAME + date - show and set date and time SYNOPSIS - date [ -u ] [ -c ] [ -n ] [ -d dsttype ] [ -t minutes-west ] - [ -a [+|-]sss.fff ] [ +format ] [ [yyyy]mmddhhmm[yy][.ss] ] + date [ -u ] [ -c ] [ -r seconds ] [ +format ] [ [yyyy]mmddhhmm[yy][.ss] + ] DESCRIPTION - Date without arguments writes the date and time to the - standard output in the form - Wed Mar 8 14:54:40 EST 1989 - with EST replaced by the local time zone's abbreviation (or - by the abbreviation for the time zone specified in the TZ - environment variable if set). The exact output format - depends on the locale. - - If a command-line argument starts with a plus sign (`+'), - the rest of the argument is used as a format that controls - what appears in the output. In the format, when a percent - sign (`%') appears, it and the character after it are not - output, but rather identify part of the date or time to be - output in a particular way (or identify a special character - to output): + The date command without arguments writes the date and time to the + standard output in the form + Wed Mar 8 14:54:40 EST 1989 + with EST replaced by the local time zone's abbreviation (or by the + abbreviation for the time zone specified in the TZ environment variable + if set). The exact output format depends on the locale. - Sample output Explanation - %a Wed Abbreviated weekday name* - %A Wednesday Full weekday name* - %b Mar Abbreviated month name* - %B March Full month name* - %c Wed Mar 08 14:54:40 1989 Date and time* - %C 19 Century - %d 08 Day of month (always two digits) - %D 03/08/89 Month/day/year (eight characters) - %e 8 Day of month (leading zero blanked) - %h Mar Abbreviated month name* - %H 14 24-hour-clock hour (two digits) - %I 02 12-hour-clock hour (two digits) - %j 067 Julian day number (three digits) - %k 2 12-hour-clock hour (leading zero blanked) - %l 14 24-hour-clock hour (leading zero blanked) - %m 03 Month number (two digits) - %M 54 Minute (two digits) - %n \n newline character - %p PM AM/PM designation - %r 02:54:40 PM Hour:minute:second AM/PM designation - %R 14:54 Hour:minute - %S 40 Second (two digits) - %t \t tab character - %T 14:54:40 Hour:minute:second - %U 10 Sunday-based week number (two digits) - %w 3 Day number (one digit, Sunday is 0) - %W 10 Monday-based week number (two digits) - %x 03/08/89 Date* - %X 14:54:40 Time* - %y 89 Last two digits of year - %Y 1989 Year in full - %Z EST Time zone abbreviation - %+ Wed Mar 8 14:54:40 EST 1989 Default output format* - * The exact output depends on the locale. + If a command-line argument starts with a plus sign ("+"), the rest of + the argument is used as a format that controls what appears in the + output. In the format, when a percent sign ("%" appears, it and the + character after it are not output, but rather identify part of the date + or time to be output in a particular way (or identify a special + character to output): - If a character other than one of those shown above appears - after a percent sign in the format, that following character - is output. All other characters in the format are copied - unchanged to the output; a newline character is always added - at the end of the output. - In Sunday-based week numbering, the first Sunday of the year - begins week 1; days preceding it are part of ``week 0.'' In - Monday-based week numbering, the first Monday of the year - begins week 1. + Sample output Explanation + %a Wed Abbreviated weekday name* + %A Wednesday Full weekday name* + %b Mar Abbreviated month name* + %B March Full month name* + %c Wed Mar 08 14:54:40 1989 Date and time* + %C 19 Century + %d 08 Day of month (always two digits) + %D 03/08/89 Month/day/year (eight characters) + %e 8 Day of month (leading zero blanked) + %h Mar Abbreviated month name* + %H 14 24-hour-clock hour (two digits) + %I 02 12-hour-clock hour (two digits) + %j 067 Julian day number (three digits) + %k 2 12-hour-clock hour (leading zero blanked) + %l 14 24-hour-clock hour (leading zero blanked) + %m 03 Month number (two digits) + %M 54 Minute (two digits) + %n \n newline character + %p PM AM/PM designation + %r 02:54:40 PM Hour:minute:second AM/PM designation + %R 14:54 Hour:minute + %S 40 Second (two digits) + %t \t tab character + %T 14:54:40 Hour:minute:second + %U 10 Sunday-based week number (two digits) + %w 3 Day number (one digit, Sunday is 0) + %W 10 Monday-based week number (two digits) + %x 03/08/89 Date* + %X 14:54:40 Time* + %y 89 Last two digits of year + %Y 1989 Year in full + %z -0500 Numeric time zone + %Z EST Time zone abbreviation + %+ Wed Mar 8 14:54:40 EST 1989 Default output format* + * The exact output depends on the locale. - To set the date, use a command line argument with one of the - following forms: - 1454 24-hour-clock hours (first two digits) and minutes - 081454 Month day (first two digits), hours, and minutes - 03081454 Month (two digits, January is 01), month day, hours, minutes - 8903081454 Year, month, month day, hours, minutes - 0308145489 Month, month day, hours, minutes, year - (on System V-compatible systems) - 030814541989 Month, month day, hours, minutes, four-digit year - 198903081454 Four-digit year, month, month day, hours, minutes - If the century, year, month, or month day is not given, the - current value is used. Any of the above forms may be - followed by a period and two digits that give the seconds - part of the new time; if no seconds are given, zero is - assumed. + If a character other than one of those shown above appears after a + percent sign in the format, that following character is output. All + other characters in the format are copied unchanged to the output; a + newline character is always added at the end of the output. - These options are available: + In Sunday-based week numbering, the first Sunday of the year begins + week 1; days preceding it are part of "week 0". In Monday-based week + numbering, the first Monday of the year begins week 1. - -u or -c - Use UTC when setting and showing the date and time. + To set the date, use a command line argument with one of the following + forms: + 1454 24-hour-clock hours (first two digits) and minutes + 081454 Month day (first two digits), hours, and minutes + 03081454 Month (two digits, January is 01), month day, hours, minutes + 8903081454 Year, month, month day, hours, minutes + 0308145489 Month, month day, hours, minutes, year + (on System V-compatible systems) + 030814541989 Month, month day, hours, minutes, four-digit year + 198903081454 Four-digit year, month, month day, hours, minutes + If the century, year, month, or month day is not given, the current + value is used. Any of the above forms may be followed by a period and + two digits that give the seconds part of the new time; if no seconds + are given, zero is assumed. - -n Do not notify other networked systems of the time - change. + These options are available: - -d dsttype - Set the kernel-stored Daylight Saving Time type to the - given value. (The kernel-stored DST type is used - mostly by ``old'' binaries.) + -u or -c + Use Universal Time when setting and showing the date and time. - -t minutes-west - Set the kernel-stored ``minutes west of UTC'' value to - the one given on the command line. (The kernel-stored - DST type is used mostly by ``old'' binaries.) - - -a adjustment - Change the time forward (or backward) by the number of - seconds (and fractions thereof) specified in the - adjustment argument. Either the seconds part or the - fractions part of the argument (but not both) may be - omitted. On BSD-based systems, the adjustment is made - by changing the rate at which time advances; on System- - V-based systems, the adjustment is made by changing the - time. + -r seconds + Output the date that corresponds to seconds past the epoch of + 1970-01-01 00:00:00 UTC, where seconds should be an integer, + either decimal, octal (leading 0), or hexadecimal (leading 0x), + preceded by an optional sign. FILES - /usr/lib/locale/L/LC_TIME description of time - locale L - /usr/local/etc/zoneinfo time zone information - directory - /usr/local/etc/zoneinfo/localtime local time zone file - /usr/local/etc/zoneinfo/posixrules used with POSIX-style - TZ's - /usr/local/etc/zoneinfo/GMT for UTC leap seconds + /etc/localtime local timezone file + /usr/lib/locale/L/LC_TIME description of time locale L + /usr/share/zoneinfo timezone information directory + /usr/share/zoneinfo/posixrules used with POSIX-style TZ's + /usr/share/zoneinfo/GMT for UTC leap seconds + + If /usr/share/zoneinfo/GMT is absent, UTC leap seconds are loaded from + /usr/share/zoneinfo/posixrules. - If /usr/local/etc/zoneinfo/GMT is absent, UTC leap seconds - are loaded from /usr/local/etc/zoneinfo/posixrules. + DATE(1) |
