|Anonymous | Login||2023-04-02 08:21 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ Issue History ] [ Print ]|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001612||[Issue 8 drafts] System Interfaces||Objection||Error||2022-11-03 11:19||2022-11-30 16:48|
|Priority||normal||Resolution||Accepted As Marked|
|Status||Applied||Product Version||Draft 2.1|
|Final Accepted Text||See Note: 0006048.|
|Summary||0001612: XSH strftime() new (I8) %s conversion requires too much of the struct tm|
strftime() says of the (newly added in Issue 8) %s conversion (lines 64826-7)
Replaced by the number of seconds since the Epoch as a decimal number,
calculated as described for mktime( ).
That is fine.
After that it adds (as with all other conversions) the fields of its struct tm
arg which are used by that conversion. For %s (line 64827) that says
That is incorrect. Checking XSH 3/mktime() we see (page 1311, lines 43852-3)
The original values of the tm_wday and tm_yday components of
the structure shall be ignored,
Hence, as the %s conversion is required to operate as specified for mktime()
and mktime() is prohibited from using tm_wday or tw_yday as part of its
calculation, it cannot possibly be necessary for those fields to be set
in a struct tm passed to strftime() for the %s conversion, hence it is
incorrect to say that all members must be set.
There is another potential problem, but that really occurs in mktime()
and so will be deferred to later issue report, related to it. Either
of the proposed resolutions below would avoid that problem (for the 2nd
alternative, provided the mktime() issue is fixed).
Either list the members that are used by mktime()
tm_year tm_mon tm_mday tm_hour tm_min tm_sec and tm_isdst
instead of "all members", which would be consistent with the
or (since the algorithm does) simply defer to XSH 3/mktime via an
XREF in the brackets.
Either way works.
Don Cragun (manager)
Change strftime() DESCRIPTION on P1997, L64827 from:
[tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec, tm_isdst]
|2022-11-03 11:19||kre||New Issue|
|2022-11-03 11:19||kre||Name||=> Robert Elz|
|2022-11-03 11:19||kre||Section||=> XSH 3/strftime|
|2022-11-03 11:19||kre||Page Number||=> 1997|
|2022-11-03 11:19||kre||Line Number||=> 64827|
|2022-11-10 16:36||Don Cragun||Note Added: 0006048|
|2022-11-10 16:37||Don Cragun||Final Accepted Text||=> See Note: 0006048.|
|2022-11-10 16:37||Don Cragun||Status||New => Resolved|
|2022-11-10 16:37||Don Cragun||Resolution||Open => Accepted As Marked|
|2022-11-10 16:37||Don Cragun||Tag Attached: issue8|
|2022-11-30 16:48||geoffclare||Status||Resolved => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|