From 021927f2f7be962d2549c978c262edd3f5c2da58 Mon Sep 17 00:00:00 2001 From: Ingo Klöcker Date: Thu, 5 Feb 2026 14:44:34 +0100 Subject: Don't cap ISO dates beyond year 2037 on Windows * src/conversion.c (_gpgme_parse_timestamp): On Windows, disable hack for 32-bit time_t. -- On Windows, SystemTimeToFileTime is used for converting the timestamp to seconds since epoch and this API doesn't have a year 2038 problem. GnuPG-bug-id: 8088 --- src/conversion.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/conversion.c') diff --git a/src/conversion.c b/src/conversion.c index d299114b..d15d7cc9 100644 --- a/src/conversion.c +++ b/src/conversion.c @@ -585,10 +585,12 @@ _gpgme_parse_timestamp (const char *timestamp, char **endp) if (endp) *endp = (char*)(timestamp + 15); +#ifndef HAVE_W32_SYSTEM /* Fixme: We would better use a configure test to see whether mktime can handle dates beyond 2038. */ if (sizeof (time_t) <= 4 && year >= 2038) return (time_t)2145914603; /* 2037-12-31 23:23:23 */ +#endif memset (&buf, 0, sizeof buf); buf.tm_year = year - 1900; -- cgit