[PATCH v2 0/4] mktime tm_isdst compatibility improvements

Florian Weimer fweimer@redhat.com
Thu Jan 2 17:42:21 GMT 2025


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



More information about the Libc-alpha mailing list