View Issue Details

IDProjectCategoryView StatusLast Update
00019691003.1(2024)/Issue8System Interfacespublic2026-01-15 17:40
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeError
Status NewResolutionOpen 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionstrptime()
Page Number2159
Line Number70579
Interp Status---
Final Accepted Text
Summary0001969: strptime() %y with a 1 digit field
DescriptionThe strptime() %y description says it is the "last 2 digits of the year" but this is misleading, as later text makes it clear the field can have 1 digit.

Specifically, the description of %y says "leading zeros shall be permitted but shall not be required". Since leading zeros are not required, a single digit input field is explicitly permitted, e.g. "1" is allowed; it doesn't have to be "01". Likewise, the statement "A leading '+' or '-' character shall be permitted" means that there is no requirement for there to be two digits because the only way for a 2-character field to have a leading '+' or '-' is if the second character is the only digit.
Desired ActionChange:
The last two digits of the year; leading zeros shall be permitted but shall not be required. A leading '+' or '-' character shall be permitted before any leading zeros but shall not be required. If a C conversion is not also performed, values in the range [69,99] shall refer to years 1969 to 1999 inclusive and values in the range [00,68] shall refer to years 2000 to 2068 inclusive.
to:
The last two digits of the year, for years greater than 9, or a value to be added to the year obtained from a C conversion (if any); leading zeros shall be permitted but shall not be required. A leading '+' or '-' character shall be permitted before any leading zeros but shall not be required. If a C conversion is not also performed, values in the range [69,99] shall be added to the year 1900 and values in the range [-9,68] shall be added to the year 2000.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-01-15 17:40 geoffclare New Issue