pkarashchenko opened a new issue, #6832:
URL: https://github.com/apache/incubator-nuttx/issues/6832

   [Linux mktime|https://linux.die.net/man/3/mktime]:
   ```
   The mktime() function modifies the fields of the tm structure as follows: 
tm_wday and tm_yday are set to values determined from the contents of the other 
fields; if structure members are outside their valid interval, they will be 
normalized (so that, for example, 40 October is changed into 9 November); 
tm_isdst is set (regardless of its initial value) to a positive value or to 0, 
respectively, to indicate whether DST is or is not in effect at the specified 
time. Calling mktime() also sets the external variable tzname with information 
about the current timezone.
   ```
   [FreeBSD mktime|https://www.freebsd.org/cgi/man.cgi?query=mktime]:
   ```
   The original values of the   tm_wday and tm_yday components of the struc-
        ture are ignored, and the original      values of the other components 
are not
        restricted      to their normal ranges, and will be normalized if 
needed.  For
        example, October 40 is changed into November 9, a tm_hour of -1 means 1
        hour before midnight, tm_mday of 0      means the day preceding the 
current
        month, and      tm_mon of -2 means 2 months before January of tm_year.  
(A
        positive or zero value for      tm_isdst causes mktime() to presume 
initially
        that summer time (for example, Daylight Saving Time) is or      is not 
in ef-
        fect for the specified time, respectively.       A negative value for 
tm_isdst
        causes the      mktime() function to attempt to divine whether summer 
time is
        in      effect for the specified time.  The tm_isdst and tm_gmtoff 
members are
        forced to zero by timegm().)
   ```
   [OpenGroup 
mktime|https://pubs.opengroup.org/onlinepubs/9699919799/functions/mktime.html] 
does not state anything about normalization.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to