summaryrefslogtreecommitdiff
path: root/src/date.c
AgeCommit message (Collapse)Author
2003-06-17(main): Call initialize_main.Jim Meyering
2003-04-11Remove anachronistic casts of xmalloc,Jim Meyering
xrealloc, and xcalloc return values and of xrealloc's first argument.
2002-12-15Remove all uses of `PARAMS'.Jim Meyering
2002-12-15Remove declaration of nstrftime.Jim Meyering
Include strftime.h instead.
2002-09-13(usage): Explain that %S's range of [0..60] is required --Jim Meyering
rather than 0..59 -- to accommodate the occasional positive leap second.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-08-08Guard inclusion of <langinfo.h> withJim Meyering
`#if HAVE_LANGINFO_CODESET', not `#if HAVE_LANGINFO_H'.
2002-08-07(main): Adjust to posixtime signature change.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-07-02(usage): Mention that the expansions of %p and %P areJim Meyering
empty in many locales. From matthew arnison.
2002-03-01Include timespec.h.Jim Meyering
(strftime, time, stime): Remove declarations; no longer needed. (usage): Document %N. (main): Use gettime rather than time to get the time of day, so that we can get fractional times. Similarly for settime and stime, so that we can set fractional times (though this currently is not available to the user since we don't parse fractional times; add FIXMES for that). Check for gettime failures; e.g. this can occur if it is past 2038 and we are a 32-bit app running on a 64-bit OS. Get fractional part of file time stamps. Do not falsely report failures just because time_t happens to be -1 (e.g. a file time stamp 1 second before the epoch). (show_date): 2nd arg is now struct timespec, not time_t. All uses changed. Use nstrftime rather than strftime, so that we can format fractional seconds.
2002-02-24Include posixver.h.Jim Meyering
2002-02-16Add support for _POSIX2_VERSION, which lets you pick which POSIXJim Meyering
version you want the utilities to conform to. Remove warnings about failure to conform to a future POSIX version. (ISO_8601_OPTION): Remove; no longer needed. All uses changed to back to the corresponding short options. (short_options): Remove; no longer needed. (COMMON_SHORT_OPTIONS): New macro. (usage): Document only the intersection of the old and new behaviors, to encourage portability. (main): Parse options using POSIX 1003.1-2001 rules if conforming to that standard. Do not warn of obsolete options.
2002-02-11Add more support for POSIX 1003.1-2001, which requires removalJim Meyering
for support of obsolete "-DIGITS" option syntax in nice, and which prohibits options with optional arguments like date's -I option. (ISO_8601_OPTION): New enum value. (long_options): Use it. (short_options): New constant. (usage): Document the change. (main): Conform to POSIX 1003.1-2001 if POSIX2_VERSION says to, otherwise warn of obsolete usage if OBSOLETE_OPTION_WARNINGS is nonzero and if not POSIXLY_CORRECT.
2002-02-11(usage): Describe %F, %g, %G, %P, and %R.Jim Meyering
2002-01-14Comment fixes to bring us up to date with respect to POSIX 1003.1-2001.Jim Meyering
In particular, POSIX.2 is now obsolete.
2001-12-15Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions. Split --help output into smaller pieces. Use fputs, not printf.
2001-11-10(usage): Document %u.Jim Meyering
2001-08-18Revert part of last change and solve the problem a better way.Jim Meyering
(show_date) [--rfc-822]: Set LC_ALL=C just before calling strftime and restore it just afterwards. Suggestion from Ulrich Drepper.
2001-08-18(show_date) [--rfc-822]: Don't space-pad the day of the month.Jim Meyering
Set only LC_TYPE to the "C" locale. Setting LC_ALL is overkill, and would have unwanted side effects if there is an error message.
2001-08-16(main): When there are too many non-option arguments,Jim Meyering
include the first offending argument in the diagnostic. Suggestion from Karl Berry.
2001-03-09(usage): Describe %C.Jim Meyering
2001-01-04(main): Fail when --rfc-822 (-R) is specified alongJim Meyering
with a format string. Reported by Jochen Hein.
2000-11-12(show_date): Add a comment explaining why theJim Meyering
format string must not be translatable via _(). From Paul Eggert.
2000-10-26(usage): Mention the time zone, UTC, and write the dateJim Meyering
in ISO format in the description of %s. Suggestion from Karl Berry.
2000-10-18(universal_time): Remove; it's just a temptation to do the wrong thing.Jim Meyering
(main): The -u option now just sets TZ; it doesn't do anything else. (show_date): Do not do anything special if -u is set. This affects the behavior of the -I and -R options.
2000-10-18Undo the effect of the 1997-07-12 change to date.c; itJim Meyering
broke "date -u MMDDhhmm" and it wasn't documented. This reverts to the behavior of the 1996-01-03 patch. (TZ_UTC0, MAYBE_SET_TZ_UTC0, set_tz): Remove. (batch_convert): Don't futz with TZ. (main): -u now parses all dates as UTC, not just some.
2000-09-09(usage): Make second `Usage' line more preciseJim Meyering
(also making it match the texinfo documentation).
2000-07-19(batch_convert): Free `initial_TZ' only if it was set.Jim Meyering
2000-05-11(usage): Don't call close_stdout_status directly,Jim Meyering
since that didn't cover --version output. (main): Instead, call close_stdout_set_status and arrange to call close_stdout via atexit.
2000-05-07(usage): Call close_stdout_status.Jim Meyering
2000-04-09Use the "C" locale when using --rfc-822 (-R), asJim Meyering
required by rfc822. Before, in the de_DE locale, date would print the German weekday and month abbreviations.
2000-04-03Include <langinfo.h> if it exists.Jim Meyering
(DATE_FMT_LANGINFO): New macro. (show_date): Use it to get the locale-specific default format for "date" if it exists.
2000-01-16(usage): Correct error in %V description.Jim Meyering
From Wolfram Kleff.
1999-09-02Remove xstrdup declaration.Jim Meyering
1999-08-22(batch_convert): Use IF_LINT macro instead of #ifdef lint.Jim Meyering
1999-08-01(usage): Correct description of %S; (00..60, not 00..61).Jim Meyering
From Ken Pizzini.
1999-05-05(show_date): Change an automatic aggregate initializerJim Meyering
to be a static one. For SunOS4's cc.
1999-04-08Accept new option: --iso-8601.Jim Meyering
1999-03-31No longer include long-options.h.Jim Meyering
[long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
1999-03-31(PROGRAM_NAME, AUTHORS): Define and use.Jim Meyering
1999-03-07(batch_convert): Use a `%s' format in error call,Jim Meyering
in case the argument string contains a `%'.
1999-03-06Include long-options.h.Jim Meyering
[long_options]: Remove the "help" and "version" entries. Remove declarations of show_help and show_version. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-01-25(usage): Remove static attribute.Jim Meyering
Move function be the first in the file.
1999-01-14Include closeout.h. (main): Use close_stdout_status.Jim Meyering
1998-12-11(main): Arrange to exit unsuccessfully when stime fails.Jim Meyering
From Andreas Schwab.
1998-10-03(main): Update to use new version of posixtime.Jim Meyering
1998-09-19update bug-reporting addressJim Meyering
1998-06-29revert back to using lower case _unlocked wrapper namesJim Meyering