Shanks0224 opened a new pull request, #22178:
URL: https://github.com/apache/nuttx/pull/22178

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   # Summary
     
     - `time1()` falls back to standard time when the DST conversion fails.
     - Fix the precision loss in `difftime()` and the 32-bit year overflow in
       `mktime()`.
     - `tzset()` copies the TZ value, preserves the abbreviation characters of
       the TZ string, and `gmtsub()` no longer loads the zone recursively.
     - The time zone is loaded without holding the time zone lock.
     - strftime: `%C`, `%x` and `%r` were wrong, `%c` and `%D` were missing.
       Compared with the C locale output of glibc for 36 conversions and 6
       hours of the day, the differences were:
       - `%c` and `%D` produced an empty string;
       - `%C` gave "00" for 1999 instead of "19";
       - `%x` used `tm_mon` without adding 1 and printed a 4-digit year;
       - `%r` printed hour 0 as "00", hour 12 as "01", and lower case "am"/"pm".
     
     ## Impact
     
     - strftime output of `%C`, `%x` and `%r` changes to the correct value.
     - No impact on the build system, documentation or hardware.
     
     ## Testing
     
     Build host: Linux x86_64.
     
     - `sim:nsh` builds with no warning.
     - strftime: all 216 outputs (36 conversions x 6 hours) on the simulator
       match glibc.
     - A multi-threaded `tzset()`/`localtime_r()` test on the simulator passes.


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