diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:13:50 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:13:50 +0300 |
commit | 71cd8e3a743046573744123777061b64881bf372 (patch) | |
tree | 82522befe647f4fff186a5630cad0cad33f8ef53 /src/date.c | |
parent | c18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff) | |
download | coreutils-upstream.tar.gz |
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'src/date.c')
-rw-r--r-- | src/date.c | 44 |
1 files changed, 25 insertions, 19 deletions
@@ -1,5 +1,5 @@ /* date - print or set the system date and time - Copyright (C) 1989-2014 Free Software Foundation, Inc. + Copyright (C) 1989-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -132,26 +132,32 @@ Display the current time in the given FORMAT, or set the system date.\n\ emit_mandatory_arg_note (); fputs (_("\ - -d, --date=STRING display time described by STRING, not 'now'\n\ - -f, --file=DATEFILE like --date once for each line of DATEFILE\n\ - -I[TIMESPEC], --iso-8601[=TIMESPEC] output date/time in ISO 8601 format.\n\ - TIMESPEC='date' for date only (the default),\n\ - 'hours', 'minutes', 'seconds', or 'ns' for date\n\ - and time to the indicated precision.\n\ + -d, --date=STRING display time described by STRING, not 'now'\n\ + -f, --file=DATEFILE like --date; once for each line of DATEFILE\n\ "), stdout); fputs (_("\ - -r, --reference=FILE display the last modification time of FILE\n\ - -R, --rfc-2822 output date and time in RFC 2822 format.\n\ - Example: Mon, 07 Aug 2006 12:34:56 -0600\n\ + -I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format.\n\ + FMT='date' for date only (the default),\n\ + 'hours', 'minutes', 'seconds', or 'ns'\n\ + for date and time to the indicated precision.\n\ + Example: 2006-08-14T02:34:56-0600\n\ "), stdout); fputs (_("\ - --rfc-3339=TIMESPEC output date and time in RFC 3339 format.\n\ - TIMESPEC='date', 'seconds', or 'ns' for\n\ - date and time to the indicated precision.\n\ - Date and time components are separated by\n\ - a single space: 2006-08-07 12:34:56-06:00\n\ - -s, --set=STRING set time described by STRING\n\ - -u, --utc, --universal print or set Coordinated Universal Time (UTC)\n\ + -R, --rfc-2822 output date and time in RFC 2822 format.\n\ + Example: Mon, 14 Aug 2006 02:34:56 -0600\n\ +"), stdout); + fputs (_("\ + --rfc-3339=FMT output date/time in RFC 3339 format.\n\ + FMT='date', 'seconds', or 'ns'\n\ + for date and time to the indicated precision.\n\ + Example: 2006-08-14 02:34:56-06:00\n\ +"), stdout); + fputs (_("\ + -r, --reference=FILE display the last modification time of FILE\n\ +"), stdout); + fputs (_("\ + -s, --set=STRING set time described by STRING\n\ + -u, --utc, --universal print or set Coordinated Universal Time (UTC)\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); @@ -255,7 +261,7 @@ Show the time on the west coast of the US (use tzselect(1) to find TZ)\n\ Show the local time for 9AM next Friday on the west coast of the US\n\ $ date --date='TZ=\"America/Los_Angeles\" 09:00 next Fri'\n\ "), stdout); - emit_ancillary_info (); + emit_ancillary_info (PROGRAM_NAME); } exit (status); } @@ -540,7 +546,7 @@ main (int argc, char **argv) ok &= show_date (format, when); } - exit (ok ? EXIT_SUCCESS : EXIT_FAILURE); + return ok ? EXIT_SUCCESS : EXIT_FAILURE; } /* Display the date and/or time in WHEN according to the format specified |