From 74ab88c51f712b0b7e87c3226b571cab7c894c6c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 2 Jun 2003 08:22:29 +0000 Subject: [PATCH] Fix some minor time-related bugs with POSIX time arguments. 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. * posixtm.h (posixtime): Return bool instead of time_t, so that we can return (time_t) -1 successfully. --- lib/posixtm.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/posixtm.h b/lib/posixtm.h index d2c01c9b6b..6b64a6eac4 100644 --- a/lib/posixtm.h +++ b/lib/posixtm.h @@ -15,10 +15,7 @@ # endif # endif -time_t -posixtime PARAMS ((const char *s, unsigned int syntax_bits)); - -struct tm * -posixtm PARAMS ((const char *s, unsigned int syntax_bits)); +bool +posixtime PARAMS ((time_t *p, const char *s, unsigned int syntax_bits)); #endif -- 2.30.2