Austin Group Defect Tracker

Aardvark Mark III


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000739 [1003.1(2013)/Issue7+TC1] System Interfaces Editorial Clarification Requested 2013-08-23 01:11 2014-05-29 15:21
Reporter dalias View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Rich Felker
Organization musl libc
User Reference
Section strftime
Page Number 2023
Line Number 64612-64623
Interp Status ---
Final Accepted Text
Summary 0000739: CX requirements for strftime seem to conflict with ISO C
Description The POSIX text for the %F format is:

"[CX] Equivalent to %+4[Option End]Y-%m-%d if no flag and no minimum field width are specified. [ tm_year, tm_mon, tm_mday]"

whereas the ISO C text is:

"%F is equivalent to ''%Y-%m-%d'' (the ISO 8601 date format). [tm_year, tm_mon, tm_mday]"

My reading of the ISO C text is that a conforming application could assume calling strftime with "%F" and with "%Y-%m-%d" produces identical output.

One could see this as a bug in the C standard, since %Y-%m-%d does not match ISO 8601, despite the above parenthetical remark.

This issue could be resolved by requiring (and indeed, I believe this is the only way an implementation can currently comply with both the POSIX and C requirements) that %Y behaves as %+4Y.
Desired Action Either add text requiring that %Y behave as %+4Y, or forward the issue to the C committee for a decision on whether C's specification of %F is erroneous.
Tags c99
Attached Files html file icon dr_strftime.html [^] (2,736 bytes) 2014-05-29 15:21

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-08-23 01:11 dalias New Issue
2013-08-23 01:11 dalias Name => Rich Felker
2013-08-23 01:11 dalias Organization => musl libc
2013-08-23 01:11 dalias Section => strftime
2013-08-23 01:11 dalias Page Number => unknown
2013-08-23 01:11 dalias Line Number => unknown
2013-09-05 15:52 eblake Tag Attached: c99
2013-09-05 15:53 Don Cragun Page Number unknown => 2023
2013-09-05 15:53 Don Cragun Line Number unknown => 64612-64623
2013-09-05 15:53 Don Cragun Interp Status => ---
2014-05-29 15:15 nick File Added: dr_strftime.html
2014-05-29 15:21 nick File Deleted: dr_strftime.html
2014-05-29 15:21 nick File Added: dr_strftime.html
2018-01-13 20:19 dennisw Issue Monitored: dennisw


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