View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001991 | Issue 8 drafts | Shell and Utilities | public | 2026-06-30 05:43 | 2026-06-30 05:43 |
| Reporter | eggert | Assigned To | |||
| Priority | low | Severity | Objection | Type | Error |
| Status | New | Resolution | Open | ||
| Name | Paul Eggert | ||||
| Organization | UCLA Computer Science Department | ||||
| User Reference | touch0001 | ||||
| Section | touch | ||||
| Page Number | 3451 | ||||
| Line Number | 117731 | ||||
| Final Accepted Text | |||||
| Summary | 0001991: touch -d 2026-06-29T00:00:60 should not be required to succeed | ||||
| Description | The POSIX spec for 'touch' (POSIX.1-2024 page 3451 line 117731) specifies an option -d whose argument uses ISO 8601 notation to specify the time. However, if read literally there is a disagreement with ISO 8601 that I believe is unintentional, and which causes GNU coreutils 'touch' to fail to conform. The apparent disagreement was introduced in POSIX.1-2017, when -d was added with ISO 8601 syntax, but with semantics that seem to defer to the longstanding -t option in the treatment of the seconds (SS) field, namely, if SS is 60 that should mean the first second of the next minute. This meaning for SS contradicts ISO 8601, which says an SS value of 60 can only mean a leap second. I expect this disagreement with ISO 8601 was unintentional. Furthermore, the disagreement disagrees with GNU 'touch', which reserves SS=60 for true leap seconds which exist on (non-POSIX) platforms that support leap seconds. GNU 'touch' takes the not unreasonable position that it is helpful to catch typos, such as hours, minutes or seconds that are out of ISO 8601 range. POSIX surely did not intend to require implementations to implement timestamps in a way that disagrees with ISO 8601. Although some implementations, such as FreeBSD 'touch', treat ":60" as meaning the first second of the next minute, this behavior should not be required. | ||||
| Desired Action | On page page 3451 line 117731, change: MM, DD, hh, mm, and SS are as with −t time. to: MM, DD, hh, mm, and SS are as with −t time, except that behavior is unspecified if SS is 60. | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-06-30 05:43 | eggert | New Issue |