public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] mktime tm_isdst compatibility improvements
@ 2025-01-02 17:42 Florian Weimer
  2025-01-02 17:42 ` [PATCH v2 1/4] time: Use __tz_convert in mktime implementation Florian Weimer
                   ` (4 more replies)
  0 siblings, 5 replies; 72+ messages in thread
From: Florian Weimer @ 2025-01-02 17:42 UTC (permalink / raw)
  To: libc-alpha

This repost addresses the technical comments from Paul Eggert, I think.
I have resequenced the changes: “time: Use a flag for localtime/gmtime
operation in __mktime_internal” comes first, under a different name.

I'm still not sure what to do about the forced DST adjustment logic.
Should we really remove all that code?  Should we change the default of
the tunable and disable the code by default?

Thanks,
Florian

Florian Weimer (4):
  time: Use __tz_convert in mktime implementation
  time: Push tzset lock into callers of time functions
  time: Do not perform forced DST adjustment for DST-less zones
  time: Implement the glibc.time.mktime_dst_adjustment tunable

 elf/dl-tunables.list           |   9 ++
 elf/libc_early_init.c          |   3 +
 include/time.h                 |  23 -----
 manual/time.texi               |  42 ++++++++-
 manual/tunables.texi           |  12 +++
 time/Makefile                  |   8 +-
 time/gmtime.c                  |   8 +-
 time/localtime.c               |   8 +-
 time/mktime-internal.h         |  25 +++---
 time/mktime.c                  | 115 +++++++++++++-----------
 time/strftime_l.c              |   1 +
 time/time-tunables.c           |  29 ++++++
 time/timegm.c                  |  13 ++-
 time/tst-mktime-dst-adjust-0.c | 154 ++++++++++++++++++++++++++++++++
 time/tst-mktime-dst-adjust-1.c |   2 +
 time/tst-mktime-dst-adjust.c   | 156 +++++++++++++++++++++++++++++++++
 time/tzfile.c                  |   1 +
 time/tzset.c                   |  20 +++--
 time/tzset.h                   |  40 +++++++++
 timezone/testdata/IST          | Bin 0 -> 285 bytes
 20 files changed, 568 insertions(+), 101 deletions(-)
 create mode 100644 time/time-tunables.c
 create mode 100644 time/tst-mktime-dst-adjust-0.c
 create mode 100644 time/tst-mktime-dst-adjust-1.c
 create mode 100644 time/tst-mktime-dst-adjust.c
 create mode 100644 time/tzset.h
 create mode 100644 timezone/testdata/IST


base-commit: cc74583f23657515b1d09d0765032422af71de52
-- 
2.47.1


^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2025-01-07  8:59 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-02 17:42 [PATCH v2 0/4] mktime tm_isdst compatibility improvements Florian Weimer
2025-01-02 17:42 ` [PATCH v2 1/4] time: Use __tz_convert in mktime implementation Florian Weimer
2025-01-02 17:42 ` [PATCH v2 2/4] time: Push tzset lock into callers of time functions Florian Weimer
2025-01-02 17:42 ` [PATCH v2 3/4] time: Do not perform forced DST adjustment for DST-less zones Florian Weimer
2025-01-02 17:42 ` [PATCH v2 4/4] time: Implement the glibc.time.mktime_dst_adjustment tunable Florian Weimer
2025-01-05  2:58 ` [PATCH v2 0/4] mktime tm_isdst compatibility improvements Paul Eggert
2025-01-05  5:56   ` [PATCH 00/59] time: sync mktime from Gnulib Paul Eggert
2025-01-06 14:30     ` Carlos O'Donell
2025-01-06 21:34       ` Joseph Myers
2025-01-06 21:43         ` Paul Eggert
2025-01-05  5:56   ` [PATCH 01/59] Split intprops.h into two Paul Eggert
2025-01-05  5:56   ` [PATCH 02/59] Support stdckdint.h internally if older GCC Paul Eggert
2025-01-05  5:56   ` [PATCH 03/59] Fix mishandling of default DST rule Paul Eggert
2025-01-05  5:56   ` [PATCH 04/59] Don't worry about !TZDEFAULT Paul Eggert
2025-01-05  5:56   ` [PATCH 05/59] Support static_assert in pre-C23 C Paul Eggert
2025-01-05  5:56   ` [PATCH 06/59] Sync mktime.c from Gnulib 2024-10-04 Paul Eggert
2025-01-05  5:56   ` [PATCH 07/59] Document mktime out-of-range + tm_isdst Paul Eggert
2025-01-05  8:03     ` Florian Weimer
2025-01-05 14:03       ` Paul Eggert
2025-01-05  5:56   ` [PATCH 08/59] Push tzset lock into callers of time functions Paul Eggert
2025-01-05  5:56   ` [PATCH 09/59] Omit parse_offset unnecessary *tz == '\0' Paul Eggert
2025-01-05  5:56   ` [PATCH 10/59] Don’t assume TZif bloat is likely Paul Eggert
2025-01-05  5:56   ` [PATCH 11/59] tzset no longer calls ftello Paul Eggert
2025-01-05  5:56   ` [PATCH 12/59] Check TZif files more carefully Paul Eggert
2025-01-05  5:56   ` [PATCH 13/59] Remove alignment assumption from __tzfile_read Paul Eggert
2025-01-05  5:56   ` [PATCH 14/59] Treat oddball UTC offset strings as zero Paul Eggert
2025-01-05  5:56   ` [PATCH 15/59] Simplify __tz_compute Paul Eggert
2025-01-05  5:56   ` [PATCH 16/59] Improve performance in 2 BC Paul Eggert
2025-01-05  5:56   ` [PATCH 17/59] Don’t mishandle years < 1970 in compute_change Paul Eggert
2025-01-05  5:56   ` [PATCH 18/59] Match RFC 9636 names Paul Eggert
2025-01-05  5:56   ` [PATCH 19/59] Trivial tzset_internal speedup Paul Eggert
2025-01-05  5:56   ` [PATCH 20/59] Fix obscure bug when stdoffset == dstoffset Paul Eggert
2025-01-05  5:56   ` [PATCH 21/59] Document assumption that NO_DST == 0 Paul Eggert
2025-01-05  5:56   ` [PATCH 22/59] __use_tzfile is boolean Paul Eggert
2025-01-05  5:56   ` [PATCH 23/59] Minor tzfile.c clarity improvements Paul Eggert
2025-01-05  5:56   ` [PATCH 24/59] Stop using zic's -y option Paul Eggert
2025-01-05  5:57   ` [PATCH 25/59] Fix mishandling of default DST rule Paul Eggert
2025-01-05  5:57   ` [PATCH 26/59] Simplify treatment of missing and empty TZ Paul Eggert
2025-01-05  5:57   ` [PATCH 27/59] TZ="" always means UTC sans leap seconds Paul Eggert
2025-01-05  5:57   ` [PATCH 28/59] Prefer "UTC" for UTC Paul Eggert
2025-01-05  5:57   ` [PATCH 29/59] Simplify setting tz_rules to UTC Paul Eggert
2025-01-05  5:57   ` [PATCH 30/59] Update tzname etc. even if TZ is unchanged Paul Eggert
2025-01-05  5:57   ` [PATCH 31/59] "POSIX TZ" -> "proleptic TZ" Paul Eggert
2025-01-05  5:57   ` [PATCH 32/59] Reject invalid TZ strings in TZif files Paul Eggert
2025-01-05  5:57   ` [PATCH 33/59] Reject TZif files containing '\0' in TZ string Paul Eggert
2025-01-05  5:57   ` [PATCH 34/59] mktime should not consult 'daylight' Paul Eggert
2025-01-05  5:57   ` [PATCH 35/59] Remove __use_tzfile Paul Eggert
2025-01-05  5:57   ` [PATCH 36/59] Remove arbitrary limit on TZ, TZDIR lengths Paul Eggert
2025-01-05  5:57   ` [PATCH 37/59] Tighten setuid TZif file name check Paul Eggert
2025-01-05  5:57   ` [PATCH 38/59] Avoid a malloc in __tzfile_read Paul Eggert
2025-01-05  5:57   ` [PATCH 39/59] Free earlier " Paul Eggert
2025-01-05  5:57   ` [PATCH 40/59] Improve __tzfile_read TZ="" comment Paul Eggert
2025-01-05  5:57   ` [PATCH 41/59] Refactor enum tz_rule_type Paul Eggert
2025-01-05  5:57   ` [PATCH 42/59] __offtime now returns struct tm * Paul Eggert
2025-01-05  5:57   ` [PATCH 43/59] Fix overflow checking in offtime Paul Eggert
2025-01-05  5:57   ` [PATCH 44/59] Handle TZif time type 0 correctly Paul Eggert
2025-01-05  5:57   ` [PATCH 45/59] Remove invalid tzset tests from tst-bz29951.c Paul Eggert
2025-01-05  5:57   ` [PATCH 46/59] tzset, not localtime, now parses TZif TZ spec Paul Eggert
2025-01-05  5:57   ` [PATCH 47/59] Minor compute_change widening tweak Paul Eggert
2025-01-05  5:57   ` [PATCH 48/59] Minor SECSPERDAY " Paul Eggert
2025-01-05  5:57   ` [PATCH 49/59] Remove leap-second goto from __tzfile_compute Paul Eggert
2025-01-05  5:57   ` [PATCH 50/59] Remove use_last label " Paul Eggert
2025-01-05  5:57   ` [PATCH 51/59] Refactor ‘if’ in __tzfile_compute Paul Eggert
2025-01-05  5:57   ` [PATCH 52/59] Refactor localtime " Paul Eggert
2025-01-05  5:57   ` [PATCH 53/59] Refactor post-transition-table ‘if’ Paul Eggert
2025-01-05  5:57   ` [PATCH 54/59] Refactor __tzfile_compute to avoid two gotos Paul Eggert
2025-01-05  5:57   ` [PATCH 55/59] Refactor __tzfile_compute index local Paul Eggert
2025-01-05  5:57   ` [PATCH 56/59] mktime: prefer bool to int Paul Eggert
2025-01-05  5:57   ` [PATCH 57/59] mktime: port __mktime64 locking to Gnulib Paul Eggert
2025-01-05  5:57   ` [PATCH 58/59] mktime: improve tm_isdst heuristic Paul Eggert
2025-01-05  5:57   ` [PATCH 59/59] time: test DST adjustment for DST-less zones Paul Eggert
2025-01-07  8:59   ` [PATCH v2 0/4] mktime tm_isdst compatibility improvements Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).