View Issue Details

IDProjectCategoryView StatusLast Update
00011841003.1(2016/18)/Issue7+TC2System Interfacespublic2019-02-28 16:36
Reporterdennisw Assigned To 
PrioritynormalSeverityObjectionTypeOmission
Status ClosedResolutionDuplicate 
NameDennis Wölfing
Organization
User Reference
Sectionstrftime
Page Number2045
Line Number65551-65557
Interp Status---
Final Accepted Text
Summary0001184: strftime %C padding character unspecified
DescriptionThe specification for the %C specifier says that when no minimum field width is specified, at least two characters will be placed. However it does not mention which character is used to pad the result when the year divided by 100 has only one digit, so the padding character is unspecified.

The C standard contains the wording
%C is replaced by the year divided by 100 and truncated to an integer, as a decimal number (00−99). [tm_year]

which makes clear that the number must be padded by '0'.
Desired ActionOn page 2045 line 65553-65555 section strftime, change:
If a minimum field width is not specified, the number of characters placed into the
array pointed to by s will be the number of digits in the year divided by 100 or two,
whichever is greater.

to:
If a minimum field width is not specified, the number of characters placed into the
array pointed to by s will be the number of digits in the year divided by 100 or two,
whichever is greater, and '0' shall be used as the padding character.
TagsNo tags attached.

Relationships

duplicate of 0000472 Closedajosey 1003.1(2008)/Issue 7 strftime %C does not account for sign character 
related to 0000466 Closedajosey 1003.1(2008)/Issue 7 date +%C problem 

Activities

geoffclare

2018-02-01 09:19

manager   bugnote:0003915

In addition to the desired action, we should also change page 2044 line 65521 from:

The default padding character is unspecified.

to:

The default padding character is unspecified, unless otherwise stated for a particular conversion specifier.

geoffclare

2019-02-21 17:24

manager   bugnote:0004262

On page 2044 line 65521 section strftime, change:
The default padding character is unspecified.
to:
The default padding character is unspecified, unless otherwise stated for a particular conversion specifier.

On page 2045 line 65553-65555 section strftime, change:
If a minimum field width is not specified, the number of characters placed into the array pointed to by s will be the number of digits in the year divided by 100 or two, whichever is greater. [CX]If a minimum field width is specified, the number of characters placed into the array pointed to by s will be the number of digits in the year divided by 100 or the minimum field width, whichever is greater.[/CX]
to:
If a minimum field width is not specified, the characters placed into the array pointed to by s shall be the value of the year divided by 100, and padded with a leading '0' if needed to reach a minimum of two characters. [CX]If a minimum field width is specified, the number of characters placed into the array pointed to by s shall be the number of digits in the year divided by 100, or the minimum field width, whichever is greater.[/CX]

eblake

2019-02-21 17:31

manager   bugnote:0004263

The edits made here collide with edits proposed in 0000472

Issue History

Date Modified Username Field Change
2018-01-31 16:49 dennisw New Issue
2018-01-31 16:49 dennisw Name => Dennis Wölfing
2018-01-31 16:49 dennisw Section => strftime
2018-01-31 16:49 dennisw Page Number => 2045
2018-01-31 16:49 dennisw Line Number => 65551-65557
2018-02-01 09:19 geoffclare Note Added: 0003915
2019-02-21 17:24 geoffclare Note Added: 0004262
2019-02-21 17:24 geoffclare Interp Status => ---
2019-02-21 17:24 geoffclare Final Accepted Text => 0001184:0004262
2019-02-21 17:24 geoffclare Status New => Resolved
2019-02-21 17:24 geoffclare Resolution Open => Accepted As Marked
2019-02-21 17:25 geoffclare Tag Attached: tc3-2008
2019-02-21 17:28 eblake Relationship added related to 0000466
2019-02-21 17:29 eblake Relationship added related to 0000472
2019-02-21 17:31 eblake Note Added: 0004263
2019-02-25 16:51 nick Resolution Accepted As Marked => Reopened
2019-02-28 16:32 Don Cragun Final Accepted Text 0001184:0004262 =>
2019-02-28 16:32 Don Cragun Status Resolved => Closed
2019-02-28 16:32 Don Cragun Resolution Reopened => Duplicate
2019-02-28 16:36 Don Cragun Relationship replaced duplicate of 0000472
2019-02-28 16:37 geoffclare Tag Detached: tc3-2008