public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug time/29951] New: daylight variable not set correctly if last DST change coincides with offset change
@ 2023-01-02  9:51 fweimer at redhat dot com
  2023-01-02  9:51 ` [Bug time/29951] " fweimer at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2023-01-02  9:51 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29951

            Bug ID: 29951
           Summary: daylight variable not set correctly if last DST change
                    coincides with offset change
           Product: glibc
           Version: 2.37
            Status: NEW
          Severity: normal
          Priority: P2
         Component: time
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

The daylight variable is supposed to be set to 1 if DST is every in use for the
current time zone. But __tzfile_read does 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.

The current tz data for Africa/Tripoli exposes this bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug time/29951] daylight variable not set correctly if last DST change coincides with offset change
  2023-01-02  9:51 [Bug time/29951] New: daylight variable not set correctly if last DST change coincides with offset change fweimer at redhat dot com
@ 2023-01-02  9:51 ` fweimer at redhat dot com
  2023-01-02 11:19 ` fweimer at redhat dot com
  2023-01-05 17:43 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2023-01-02  9:51 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29951

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com
              Flags|                            |security-
             Status|NEW                         |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug time/29951] daylight variable not set correctly if last DST change coincides with offset change
  2023-01-02  9:51 [Bug time/29951] New: daylight variable not set correctly if last DST change coincides with offset change fweimer at redhat dot com
  2023-01-02  9:51 ` [Bug time/29951] " fweimer at redhat dot com
@ 2023-01-02 11:19 ` fweimer at redhat dot com
  2023-01-05 17:43 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2023-01-02 11:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29951

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
Patch posted:

[PATCH] time: Set daylight to 1 for matching DST/offset change (bug 29951)
<https://sourceware.org/pipermail/libc-alpha/2023-January/144434.html>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug time/29951] daylight variable not set correctly if last DST change coincides with offset change
  2023-01-02  9:51 [Bug time/29951] New: daylight variable not set correctly if last DST change coincides with offset change fweimer at redhat dot com
  2023-01-02  9:51 ` [Bug time/29951] " fweimer at redhat dot com
  2023-01-02 11:19 ` fweimer at redhat dot com
@ 2023-01-05 17:43 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2023-01-05 17:43 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29951

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |2.37
         Resolution|---                         |FIXED

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Fixed via:

commit 35141f304e319109c322f797ae71c0b9420ccb05
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jan 5 18:21:25 2023 +0100

    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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-01-05 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-02  9:51 [Bug time/29951] New: daylight variable not set correctly if last DST change coincides with offset change fweimer at redhat dot com
2023-01-02  9:51 ` [Bug time/29951] " fweimer at redhat dot com
2023-01-02 11:19 ` fweimer at redhat dot com
2023-01-05 17:43 ` fweimer at redhat dot com

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).