bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#81331: touch -d doesn't allow a date_time string of YYYY-MM-DDThh:mm


From: Collin Funk
Subject: bug#81331: touch -d doesn't allow a date_time string of YYYY-MM-DDThh:mm:60, which POSIX requires special behavior for
Date: Tue, 30 Jun 2026 19:13:31 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Paul,

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 2026-06-29 20:28, Collin Funk wrote:
>> I am thinking this will have to be implemented as a flag for
>> parse_datetime2.
>
> Although I wrote a patch to implement that merely by changing
> src/touch.c (i.e., no changes to parse_datetime2, which is already
> plenty complicated!),

No disagreement from me there. :)

> on further thought I am inclined to think this is a bug in POSIX not
> in GNU 'touch', as the POSIX spec contradicts ISO 8601 which I don't
> think was intended. So I filed a bug report with the POSIX folks here:
>
> https://austingroupbugs.net/view.php?id=1991
>
> Let's hold off on changing GNU 'touch' until the POSIX committee has a
> chance to think about it. And if we do change GNU 'touch', my feeling
> is that we should do so only if POSIXLY_CORRECT, as this business
> about :60 meaning the start of the next minute is surprising and can
> have unexpected consequences.

That plan sounds good to me.

I didn't realize it contradicts ISO 8601. I assume they only allow 60
seconds to be specified when it refers to a leap second? That is what
Wikipedia says, but I and likely the person who wrote it don't feel like
spending a few hundred dollars on the standard.

Collin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]