Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc/time
Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
> Date: Sun, 23 Oct 2022 13:53:01 -0400
> From: Jan Schaumann <jschauma%netmeister.org@localhost>
> Message-ID: <Y1V/fYAEKv9d9i/g%netmeister.org@localhost>
>
> | Hmm, maybe something like this?
>
> I think there is still too much there, you don't have
> to explain everything (or almost anything), but it is
> in the right direction I think.
New proposal:
---
[...] components are not restricted to their normal
ranges and will be normalized, if need be.
For example, consider a struct tm initialized with a
tm_year = 122, tm_mon = 10, tm_mday = 30, tm_hour =
22, tm_min = 57, and a tm_sec = 0. Incrementing
tm_min by 13 and calling mktime() would lead to a
tm_hour = 23 and tm_min = 10.
This normalizing can lead to cascading changes: Again
using a struct tm initialized as in the above example
but with a tm_hour = 23, the same change would lead to
a tm_mon = 11, tm_mday = 1, tm_hour = 0, and tm_min =
10.
Negative values may also be normalized with similar
cascading effect such that e.g., a tm_hour of −1 means
1 hour before mid‐ night on the previous day and so
on.
---
?
-Jan
Home |
Main Index |
Thread Index |
Old Index