[Toybox] [PATCH] date: add --iso and the %:z output format.
Rob Landley
rob at landley.net
Sun Nov 15 16:54:29 PST 2020
On 11/15/20 1:10 PM, enh wrote:
>
>
> On Sun, Nov 15, 2020, 00:53 Rob Landley <rob at landley.net
> <mailto:rob at landley.net>> wrote:
>
> On 11/14/20 5:06 PM, enh via Toybox wrote:
> > I didn't know until implementing this that --iso is actually called
> > --iso-8601 and that GNU date will actually accept any prefix. --iso-8
> > works fine too. I've assumed that --iso (that I always used) and
> > --iso-8601 (as given in the documentation) are the only two that matter.
> > ---
>
> Please explain this line:
>
> strcpy(out+4, out+3);
>
>
> strftime only supports the -0800 style of time zone, so that moves the 00 up so
> we can insert the : and get -08:00.
Let me rephrase:
Pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
I switched it to memmove().
Rob
More information about the Toybox
mailing list