View Issue Details

IDProjectCategoryView StatusLast Update
00009541003.1(2008)/Issue 7System Interfacespublic2016-02-25 16:50
Reporterwpollock Assigned Toajosey  
PrioritynormalSeverityObjectionTypeEnhancement Request
Status ClosedResolutionDuplicate 
NameWayne Pollock
Organization
User Reference
Sectionstrftime
Page Number2024
Line Number64641-64642
Interp Status---
Final Accepted Text
Summary0000954: Add %s to strftime
Descriptionstrftime 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 ActionChange:

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.)
TagsNo tags attached.

Relationships

related to 0000169 Closedajosey date utility needs ``%s'' 

Activities

geoffclare

2015-06-04 08:35

manager   bugnote:0002692

This addition is already being made via 0000169. (That bug only requested %s be added to the date utility, but the resolution in 0000169:0000283 adds it to strftime() and strptime() as well.)

geoffclare

2015-06-04 08:46

manager   bugnote:0002693

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.

geoffclare

2016-02-25 16:50

manager   bugnote:0003087

This is being closed as a duplicate. The resolution for 0000169 has been updated to include the additions from 0000954:0002693.

Issue History

Date Modified Username Field Change
2015-06-04 00:54 wpollock New Issue
2015-06-04 00:54 wpollock Status New => Under Review
2015-06-04 00:54 wpollock Assigned To => ajosey
2015-06-04 00:54 wpollock Name => Wayne Pollock
2015-06-04 00:54 wpollock Section => strftime
2015-06-04 00:54 wpollock Page Number => 2024
2015-06-04 00:54 wpollock Line Number => 64641-64642
2015-06-04 08:31 geoffclare Relationship added related to 0000169
2015-06-04 08:35 geoffclare Note Added: 0002692
2015-06-04 08:46 geoffclare Note Added: 0002693
2016-02-25 16:50 geoffclare Interp Status => ---
2016-02-25 16:50 geoffclare Note Added: 0003087
2016-02-25 16:50 geoffclare Status Under Review => Closed
2016-02-25 16:50 geoffclare Resolution Open => Duplicate