From 378c74faf328dd07970e24ddaa2858531ff6cd08 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Tue, 13 Feb 2024 19:30:52 +0100 Subject: Import tzcode 2024a --- strftime.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'strftime.c') diff --git a/strftime.c b/strftime.c index df169830f9ef..755d341fa6d9 100644 --- a/strftime.c +++ b/strftime.c @@ -327,11 +327,12 @@ label: tm.tm_mday = t->tm_mday; tm.tm_mon = t->tm_mon; tm.tm_year = t->tm_year; +#ifdef TM_GMTOFF + mkt = timeoff(&tm, t->TM_GMTOFF); +#else tm.tm_isdst = t->tm_isdst; -#if defined TM_GMTOFF && ! UNINIT_TRAP - tm.TM_GMTOFF = t->TM_GMTOFF; -#endif mkt = mktime(&tm); +#endif /* If mktime fails, %s expands to the value of (time_t) -1 as a failure marker; this is better in practice -- cgit v1.3