Sophie

Sophie

distrib > Mageia > 9 > i586 > by-pkgid > af22603ff8b9e06e9deab19a799d1d3d > files > 83

glibc-2.36-49.mga9.src.rpm

From e05036b194559cbfcdfcfb1b920d37b939e3e35c Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 5 Jan 2023 18:21:25 +0100
Subject: [PATCH 182/182] time: Set daylight to 1 for matching DST/offset
 change (bug 29951)

The daylight variable is supposed to be set to 1 if DST is ever in
use for the current time zone.  But __tzfile_read used to do this:

  __daylight = rule_stdoff != rule_dstoff;

This check can fail to set __daylight to 1 if the DST and non-DST
offsets happen to be the same.

(cherry picked from commit 35141f304e319109c322f797ae71c0b9420ccb05)
---
 NEWS                   |   1 +
 time/tzfile.c          |  41 +++++++++++++------------
 timezone/Makefile      |   4 ++-
 timezone/testdata/XT6  | Bin 0 -> 625 bytes
 timezone/tst-bz29951.c |  68 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 94 insertions(+), 20 deletions(-)
 create mode 100644 timezone/testdata/XT6
 create mode 100644 timezone/tst-bz29951.c

diff --git a/NEWS b/NEWS
index dbe2b2e301df..8c79e83b775c 100644
--- a/NEWS
+++ b/NEWS
@@ -51,6 +51,7 @@ The following bugs are resolved with this release:
   [29730] broken y2038 support in fstatat on MIPS N64
   [29771] Restore IPC_64 support in sysvipc *ctl functions
   [29776] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10
+  [29951] time: Set daylight to 1 for matching DST/offset change
 
 Version 2.36