summaryrefslogtreecommitdiff
path: root/lib/posixtm.c
AgeCommit message (Collapse)Author
2006-08-21Remove from CVS, since the bootstrap script generates them automatically.Paul Eggert
2006-07-09Update from gnulib.Paul Eggert
2005-11-01(year): Arg is now syntax_bits rather than allow_century.Paul Eggert
All usages changed. Reject dates outside the range 1969-1999 if PDS_PRE_2000 is used.
2005-09-22Sync from gnulib.Paul Eggert
2005-07-03(posixtime) [lint]: Initialize *all* of tm0, not justJim Meyering
the .tm_year member, since otherwise gcc-4.0 would now warn about tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-09(posixtime) [lint]: Avoid spurious warning from gcc-4'sJim Meyering
-Wuninitialized: initialize tm0.tm_year.
2004-10-04Sync from gnulib, to remove dependencies of other modules on unlocked-io.Paul Eggert
2004-08-02(posix_time_parse): Don't assume that the length ofPaul Eggert
the string being parsed is <= UINT_MAX.
2003-09-10Include <stdlib.h>, <string.h> unconditionally.Jim Meyering
(main): Define with a prototype.
2003-06-06Include <stdbool.h> unconditionally.Jim Meyering
2002-08-07Fix some minor time-related bugs with POSIX time arguments.Jim Meyering
Some valid time stamps were being rejected (notably -1, and time stamps before 1900 on 64-bit hosts). And some invalid time stamps were being accepted, e.g. September 31. * lib/posixtm.h (posixtime): Return bool instead of time_t, so that we can return (time_t) -1 successfully. * lib/posixtm.c: Likewise. [HAVE_STDBOOL_H]: Include <stdbool.h>. (bool, false, true) [!HAVE_STDBOOL_H]: New type. (t): Remove static var. (year, posix_time_parse): Now takes struct tm * arg to modify, instead of static var. All uses changed. (year): Do not reject years before 1900; they can occur with 64-bit time_t. (posix_time_parse): Do not check for out-of-range components; that is now the caller's responsibility, since our checks were only approximations. (posixtime): Use mktime to check for out-of-range components, since it knows them exactly. If mktime returns (time_t) -1, check whether an error actually occurred by invoking localtime on -1. (main) [TEST_POSIXTIME]: Check for input data errors, and report posixtime failures better. Improve the test data (in comments only).
2002-01-16(ISDIGIT): Comment fix.Jim Meyering
2001-12-09(posix_time_parse): Add cast to avoid warning aboutJim Meyering
`signed and unsigned type in conditional expression'.
2001-11-17Include unlocked-io.h.Jim Meyering
2000-06-26[HAVE_STDLIB_H]: Include stdlib.h.Jim Meyering
1998-12-31(posix_time_parse): Change type of index `i' from int to unsigned int.Jim Meyering
1998-10-02*** empty log message ***Jim Meyering
1998-10-02*** empty log message ***Jim Meyering
1998-09-07add test harnessJim Meyering
1998-09-07*** empty log message ***Jim Meyering
1998-09-07*** empty log message ***Jim Meyering
1998-09-06rewrite from yacc-based versionJim Meyering
1998-09-06.Jim Meyering
1994-11-06Initial revisionJim Meyering