Anonymous | Login | 2025-01-16 17:43 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 | ||
0000954 | [1003.1(2008)/Issue 7] System Interfaces | Objection | Enhancement Request | 2015-06-04 00:54 | 2016-02-25 16:50 | ||
Reporter | wpollock | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Duplicate | ||||
Status | Closed | ||||||
Name | Wayne Pollock | ||||||
Organization | |||||||
User Reference | |||||||
Section | strftime | ||||||
Page Number | 2024 | ||||||
Line Number | 64641-64642 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0000954: Add %s to strftime | ||||||
Description |
strftime in <time.h> is the standard way to format time data, and its use is specified for the date(1) utility. While there are other interfaces that can produce the number of seconds since the epoch, strftime is the correct place for this. Currently some implementations (such as glibc) provide this. Related to 169, 466. (Should be tagged for issue 8.) |
||||||
Desired Action |
Change: R Replaced by the time in 24-hour notation (%H:%M). [tm_hour, tm_min] S Replaced by the second as a decimal number [00,60]. [tm_sec] With: R Replaced by the time in 24-hour notation (%H:%M). [tm_hour, tm_min] s Replaced by the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), corrected for timezone and any seasonal time adjustments (see XBD Seconds Since the Epoch) S Replaced by the second as a decimal number [00,60]. [tm_sec] (Note that if approved, this will also update the description of the date(1) utility.) |
||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
Relationships | ||||||
|
Notes | |
(0002692) geoffclare (manager) 2015-06-04 08:35 |
This addition is already being made via 0000169. (That bug only requested %s be added to the date utility, but the resolution in Note: 0000283 adds it to strftime() and strptime() as well.) |
(0002693) geoffclare (manager) 2015-06-04 08:46 |
Looking again at 0000169 it seems that we may have missed something: what should strftime() do in cases where %s is used and mktime() would return -1. I think there should be a "may fail" EOVERFLOW error along these lines: EOVERFLOW The format string includes a %s conversion and the number of seconds since the Epoch cannot be represented in a time_t. Note that the RETURN VALUE section will also need updating if this error is added. |
(0003087) geoffclare (manager) 2016-02-25 16:50 |
This is being closed as a duplicate. The resolution for 0000169 has been updated to include the additions from Note: 0002693. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |