Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For strftime %z, use tm_gmtoff if available
Problem and draft patch reported by Dag-Erling Smørgrav in: https://mm.icann.org/pipermail/tz/2024-January/033488.html * NEWS: Mention this. * localtime.c (EXTERN_TIMEOFF): Default to static. (timeoff): Use EXTERN_TIMEOFF to declare; this is easier to read. * private.h (EXTERN_TIMEOFF): New macro. (timeoff): Define to tz_private_timeoff if it’s not public but strftime needs it anyway. Declare if we define it as extern. * strftime.c (_fmt): If TM_GMTOFF is available, use timeoff rather than mktime to determine %z. Do not worry about UNINIT_TRAP since we are now using a more-generous reading of POSIX.
- Loading branch information
Showing
4 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a707253
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's
%s
, not%z
. The commit message can't be changed but theNEWS
entry should be corrected.