diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2024-02-13 19:30:52 +0100 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2024-02-13 19:30:52 +0100 |
| commit | 378c74faf328dd07970e24ddaa2858531ff6cd08 (patch) | |
| tree | c116ff274e76c285cb3af257a16a3232793e78ac /strftime.c | |
| parent | d5228e8957c2b6a9cbb2a73947640ce3c70097e8 (diff) | |
Import tzcode 2024avendor/tzcode/tzcode2024a
Diffstat (limited to 'strftime.c')
| -rw-r--r-- | strftime.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 |
