Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000472 [1003.1(2008)/Issue 7] System Interfaces Objection Error 2011-07-07 08:37 2024-06-11 08:53
Reporter markh View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Mark Harris
Organization
User Reference
Section strftime
Page Number 2008
Line Number 63559
Interp Status Approved
Final Accepted Text see Note: 0004270
Summary 0000472: strftime %C does not account for sign character
Description The text for strftime conversion specifier %C does not account for
any required sign character in the total number of output characters.
As a result it contradicts other text which does include this character.

For example, suppose strftime is called with format string "%+2C"
or "%+3C" and tm_year = 8100 (i.e. year 10000). Line 63523 requires
that "a leading <plus-sign> character shall be included" but line
63561 allows only the 3 characters required by the digits.

Like the text for %G and %Y, the text for %C should account for any
required sign character.
Desired Action On line 63559 and line 63561
Change:

  ...number of digits...

to:

  ...number of digits and leading sign characters (if any)...
Tags tc3-2008
Attached Files

- Relationships
has duplicate 0001184Closed 1003.1(2016/18)/Issue7+TC2 strftime %C padding character unspecified 

-  Notes
(0000886)
geoffclare (manager)
2011-07-07 11:36

There is also an ambiguity in the text "the number of digits in the
year divided by 100". It can be read as:

    <the number of digits in> <the year divided by 100>

as intended, or as:

    <the number of digits in the year> <divided by 100>

Another rather picky point is that it doesn't mention the truncation.
Line 63556 implies this is a separate operation applied after the
division, so the later reference to "year divided by 100" could be
taken as omitting the truncation (and thus the number of digits
could be considered to include any digits after the decimal point).

In addition the text uses "will" instead of "shall".

Change L63558-63562 from:

    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 number of
    characters placed into the array pointed to by s shall be the
    number of digits and leading sign characters (if any) in the
    result of dividing the year by 100 and truncating, 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
    shall be the number of digits and leading sign characters (if any)
    in the result of dividing the year by 100 and truncating, or the
    minimum field width, whichever is greater.[/CX]

On P2009 L63622 (Y conversion) change "will" to "shall".
(0000892)
markh (reporter)
2011-07-28 07:32

Also on P2009 L63584 (G conversion) change "will" to "shall".
(0000936)
eblake (manager)
2011-08-11 15:38
edited on: 2019-02-28 16:40

OLD Interpretation response (superseded by Note: 0004270)
------------------------
The standard states that %C must produce output with width that is inconsistent when there is a leading sign, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
-------------
The standard should be consistent between %C, %G, and %Y.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Make the changes suggested in Note: 0000886 and Note: 0000892

(0001301)
ajosey (manager)
2012-06-29 16:19

Interpretation proposed 29 June 2012 for final 45 day review
(0001342)
ajosey (manager)
2012-08-30 09:11

Interpretation approved 30 Aug 2012
(0004266)
nick (manager)
2019-02-25 17:05

Reopened to resolve differences with bug:1184
(0004270)
geoffclare (manager)
2019-02-28 14:43

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
The standard should be consistent between %C, %G, and %Y.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------

Change L63558-63562 from:
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:
  • If the year is between 0 and 9999 inclusive, two characters shall be placed into the array pointed to by s, including a leading '0' if there would otherwise be only a single digit.

  • [CX]If the year is less than 0 or greater than 9999, the number of characters placed into the array pointed to by s shall be the number of digits and leading sign characters (if any) in the result of dividing the year by 100 and truncating, or two, whichever is greater.[/CX]
[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 and leading sign characters (if any) in the result of dividing the year by 100 and truncating, or the minimum field width, whichever is greater.[/CX]

On P2009 L63584 (G conversion) change "will" to "shall".

On P2009 L63622 (Y conversion) change "will" to "shall".
(0004316)
agadmin (administrator)
2019-03-12 14:05

Interpretation Proposed: 12 March 2019
(0004368)
agadmin (administrator)
2019-04-17 10:52

Interpretation approved: 17 April 2019

- Issue History
Date Modified Username Field Change
2011-07-07 08:37 markh New Issue
2011-07-07 08:37 markh Status New => Under Review
2011-07-07 08:37 markh Assigned To => ajosey
2011-07-07 08:37 markh Name => Mark Harris
2011-07-07 08:37 markh Section => strftime
2011-07-07 08:37 markh Page Number => 2008
2011-07-07 08:37 markh Line Number => 63559
2011-07-07 11:36 geoffclare Note Added: 0000886
2011-07-28 07:32 markh Note Added: 0000892
2011-08-11 15:38 eblake Note Added: 0000936
2011-08-11 15:40 eblake Interp Status => ---
2011-08-11 15:40 eblake Final Accepted Text => see Note: 0000936
2011-08-11 15:40 eblake Status Under Review => Resolved
2011-08-11 15:40 eblake Resolution Open => Accepted As Marked
2011-08-11 15:40 eblake Tag Attached: issue8
2011-08-11 15:41 eblake Interp Status --- => Pending
2011-08-11 18:08 Don Cragun Status Resolved => Interpretation Required
2012-06-29 16:19 ajosey Interp Status Pending => Proposed
2012-06-29 16:19 ajosey Note Added: 0001301
2012-08-30 09:11 ajosey Interp Status Proposed => Approved
2012-08-30 09:11 ajosey Note Added: 0001342
2019-02-21 17:29 eblake Relationship added related to 0001184
2019-02-25 16:57 nick Resolution Accepted As Marked => Reopened
2019-02-25 17:05 nick Note Added: 0004266
2019-02-28 14:43 geoffclare Note Added: 0004270
2019-02-28 14:44 geoffclare Tag Detached: issue8
2019-02-28 16:32 geoffclare Interp Status Approved => Pending
2019-02-28 16:32 geoffclare Final Accepted Text see Note: 0000936 => see Note: 0004270
2019-02-28 16:32 geoffclare Resolution Reopened => Accepted As Marked
2019-02-28 16:32 geoffclare Tag Attached: tc3-2008
2019-02-28 16:36 Don Cragun Relationship replaced has duplicate 0001184
2019-02-28 16:40 geoffclare Note Edited: 0000936
2019-03-12 14:05 agadmin Interp Status Pending => Proposed
2019-03-12 14:05 agadmin Note Added: 0004316
2019-04-17 10:52 agadmin Interp Status Proposed => Approved
2019-04-17 10:52 agadmin Note Added: 0004368
2019-10-18 11:07 geoffclare Status Interpretation Required => Applied
2024-06-11 08:53 agadmin Status Applied => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker