Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Apr 2023 13:53:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 257075] touch(1) does not accept input from date(1) with -I to -d
Message-ID:  <bug-257075-227-qYJKq4Gz6z@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-257075-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-257075-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257075

--- Comment #4 from Daniel Tameling <tamelingdaniel@gmail.com> ---
Created attachment 241265
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D241265&action=
=3Dedit
Adds support for the output ISO 8601 output of date(1)

I tried to come up with a patch. I looked at the source code of date and it
manually adds the colon. So I had to remove it manually. I now supports the
timezone with and without a colon.

$ ./touch -d 2021-07-09T10:17:08+02:00 test1
$ ./touch -d 2021-07-09T10:17:08+0200  test2
$ gtouch -d 2021-07-09T10:17:08+02:00  test3
$ stat -f '%Sm %N' test*=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20
Jul  9 10:17:08 2021 test1
Jul  9 10:17:08 2021 test2
Jul  9 10:17:08 2021 test3

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-257075-227-qYJKq4Gz6z>