summaryrefslogtreecommitdiff
path: root/src/date.c
AgeCommit message (Collapse)Author
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-12Assume `free (NULL)' works.Jim Meyering
2005-04-26Remove posixver.h and its uses.Paul Eggert
(COMMON_SHORT_OPTIONS): Remove. (short_options): New constant. (short_options, usage): -I now always takes an optional arg.
2005-03-28(time_spec_string): Use NULL, not `0'.Jim Meyering
2005-03-08(usage): Redo to match recent documentation changes.Paul Eggert
Don't bother documenting which usages are GNU extensions; the list wasn't correct, and is better left to the printed manual anyway.
2005-02-21(main): gettime now returns void.Paul Eggert
2004-09-21Remove unused "case 0".Paul Eggert
2004-08-03(show_date, rfc_format, batch_convert, main): Use bool for booleans.Paul Eggert
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-01(batch_convert): Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.Jim Meyering
2004-03-17(enum Time_spec): New enum TIME_SPEC_NS.Jim Meyering
(time_spec_string, time_spec, show_date): Support it. (usage): Remove description of -ITIMESPEC, as it's obsolete and confusing. Mention --iso-8601=ns. (batch_convert): getline returns ssize_t, not int.
2004-02-05Don't dump core if localtime returns NULL (possible onJim Meyering
hosts with 64-bit time_t and 32-bit int). Include "inttostr.h". (batch_convert, main): If time conversion fails, exit with nonzero status. (show_date): Return int to report conversion failure. Print the time as an int if localtime fails.
2004-02-05Don't include timespec.h, now that system.h does it.Jim Meyering
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
(FATAL_ERROR, main): Exit with status EXIT_FAILURE, not 2, on errors. (main): Don't assume EXIT_FAILURE == 1, as POSIX doesn't require it.
2003-11-04(show_date): Use x2nrealloc rather than xrealloc.Jim Meyering
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-08-01(long_options, usage, main): Add --rfc-2822 option to GNU date.Jim Meyering
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-19Include "exitfail.h".Jim Meyering
(main): Set exit_failure rather than calling close_stdout_set_status.
2003-07-11(batch_convert): Use the quote function rather than using literal `...' inJim Meyering
a diagnostic.
2003-07-11Include "quote.h".Jim Meyering
Use the quote function rather than using literal `...' in a diagnostic.
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.