From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>,
mtk.manpages@gmail.com, linux-man@vger.kernel.org
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2 1/2] ctime.3: mktime() may modify tm_hour due to tm_isdst
Date: Fri, 15 Oct 2021 23:49:38 +0200 [thread overview]
Message-ID: <a927fbd7-6eff-8944-b772-a77f89e38212@gmail.com> (raw)
In-Reply-To: <1ca68ed3-93e7-c94a-1859-ab876412e4c7@cs.ucla.edu>
Hi Paul,
On 10/11/21 5:36 PM, Paul Eggert wrote:
> On 10/11/21 4:12 AM, Alejandro Colomar wrote:
>> +If the initial value of
>> +.I tm_isdst
>> +is inconsistent with the one set by
>> +.BR mktime (),
>> +.I tm_hour
>> +(and possibly other fields)
>> +will be modified to normalize the time to the correct DST.
>
> I don't see why this change is necessary. mktime normalizes all its
> input fields: there's nothing special about tm_isdst and tm_hour.
>
> If normalization isn't explained clearly enough elsewhere in the man
> page, that explanation should be fixed; there shouldn't be special-case
> wording that implies that this is the only special case.
Hmm, you're right. I think I was misled by the wording "if structure
members are outside their valid interval", which led me to think that
since 08h was between 0 and 23 it shouldn´t be affected, but the
normalization goes beyond that and interprets "valid range" as a more
general concept so that the full time has to correspond to a valid time
for a given timezone.
I'm not sure how to reword it. I'll keep it with the original text, and
keep thinking about it.
Thanks,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
next prev parent reply other threads:[~2021-10-15 21:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 10:52 [PATCH] " Alejandro Colomar
2021-10-11 10:27 ` Alejandro Colomar (man-pages)
2021-10-11 11:12 ` [PATCH v2 1/2] " Alejandro Colomar
2021-10-11 15:36 ` Paul Eggert
2021-10-15 21:49 ` Alejandro Colomar (man-pages) [this message]
2021-10-11 11:12 ` [PATCH v2 2/2] timegm.3: Remove recommendation against use of timegm() Alejandro Colomar
2021-10-11 15:40 ` Paul Eggert
2021-10-15 22:03 ` Alejandro Colomar (man-pages)
2021-10-16 0:20 ` Paul Eggert
2021-10-17 18:02 ` Alejandro Colomar (man-pages)
2021-10-17 22:00 ` Paul Eggert
2021-11-05 0:47 ` Alejandro Colomar (man-pages)
2021-11-08 8:05 ` Paul Eggert
2021-10-11 11:54 ` [PATCH v3 1/2] ctime.3: mktime() may modify tm_hour due to tm_isdst Alejandro Colomar
2021-10-11 11:54 ` [PATCH v3 2/2] timegm.3: Remove recommendation against their use Alejandro Colomar
2021-10-11 15:37 ` [PATCH] ctime.3: mktime() may modify tm_hour due to tm_isdst Paul Eggert
2021-10-11 22:05 ` Joseph Myers
2021-10-15 21:55 ` Alejandro Colomar (man-pages)
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=a927fbd7-6eff-8944-b772-a77f89e38212@gmail.com \
--to=alx.manpages@gmail.com \
--cc=eggert@cs.ucla.edu \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/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).