[Toybox] [PATCH] date: some fixes.

enh enh at google.com
Fri Feb 8 09:54:48 PST 2019


On Fri, Feb 8, 2019, 09:25 Rob Landley <rob at landley.net wrote:

> On 2/7/19 9:08 PM, enh via Toybox wrote:
> > Add support for more input formats, primarily the ISO formats used by
> > the AOSP build.
>
> Ok.
>
> > Also, our interpretation of @UNIXTIME was wrong: surprisingly, it should
> > respect $TZ.
>
> That's _insane_.
>
> Does "date +%s" also adjust for $TZ? If so, it's NOT UNIXTIME. If it does,
> "date
> @$(date +%s)" moves the clock by multiple hours...


This change certainly produces results consistent with the GNU date, but I
suspect it's not "right right". I didn't get to a point where I had working
support for input starting `TZ="blah" ` so I backed out what I'd done and
sent you this as a "better than yesterday" stop gap. But I suspect that
when we get to the point where we handle separate input and output
timezones, this presumably goes back to UTC (unless it's preceded by TZ=)
and the *output* conversion produces this effect instead?

We'll see when we get there...

Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190208/52ad2450/attachment-0001.htm>


More information about the Toybox mailing list