public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: DJ Delorie <dj@redhat.com>, Paul Eggert <eggert@cs.ucla.edu>
Cc: libc-alpha@sourceware.org
Subject: Re: [swbz 29035] mktime vs non-DST
Date: Wed, 17 Aug 2022 22:37:06 -0400	[thread overview]
Message-ID: <8c91bbc3-95cc-88d0-ffe9-5da08fcfdf38@redhat.com> (raw)
In-Reply-To: <xnsflu5nyq.fsf@greed.delorie.com>

On 8/17/22 21:39, DJ Delorie via Libc-alpha wrote:
> Paul Eggert <eggert@cs.ucla.edu> writes:
>> Although I'm not seeing how BZ#29035 led to your diagnosis
> 
> We had a customer bz with a similar problem.  I wrote a script to test
> every transition in every zoneinfo file, plus a january/june check, for
> every tm_isdst.  The patterns tend to jump out at you after that.
> 
>> This is a bit fancier than what you suggested, but I expect it'll fix
>> BZ#29035 while it's also fixing the bug reported against Gnulib.
> 
> It does stop mktime from returning -1 in the problem case, but it still
> returns a different value than pre-2.29.  Older code returned the
> standard time result, your patches return a DST result, even if the zone
> has no DST.  I think this makes it more consistent, but I don't know
> what the consequences of "different than before" will be here.
 
Different than before is problematic because of existing code expectations.

The mktime() interface has been around for a long time and users do not expect
and have noticed the semantic changes we are seeing here today.

I would lean towards making the code do exactly what it did before in these
corner cases (unless we don't consider them corner cases).

May you please share some examples you have from your analysis and share how
they are different before and now? How far back does the old behaviour go?

-- 
Cheers,
Carlos.


  reply	other threads:[~2022-08-18  2:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 21:18 DJ Delorie
2022-08-17 21:50 ` Carlos O'Donell
2022-08-17 23:10 ` Paul Eggert
2022-08-18  1:39   ` DJ Delorie
2022-08-18  2:37     ` Carlos O'Donell [this message]
2022-08-18  3:16       ` Paul Eggert
2022-08-18  4:05         ` Carlos O'Donell
2022-08-18 21:17       ` DJ Delorie
2022-08-18 21:57         ` Paul Eggert
2022-08-18 22:40           ` DJ Delorie
2022-08-18 22:58             ` Paul Eggert
2022-08-19 18:15               ` DJ Delorie
2022-08-19 22:04                 ` Paul Eggert
2022-08-18  3:02     ` Paul Eggert
2022-09-08 20:25   ` DJ Delorie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c91bbc3-95cc-88d0-ffe9-5da08fcfdf38@redhat.com \
    --to=carlos@redhat.com \
    --cc=dj@redhat.com \
    --cc=eggert@cs.ucla.edu \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).