zed
zed copied to clipboard
time differences should be durations
echo '{ts:2018-03-24T17:30:20Z}' | zq 'cut delta:=(ts+1s)-ts' -
is
{delta:1970-01-01T00:00:01Z}
but should be
{delta:1s}
Yep. This has been with us for a while. I just closed #1792 as a duplicate.
Just closed another duplicate, #3741. Note that community user @cogphn took the time to react with a 🎉 emoji to that other issue, so there's outside interest in seeing this addressed. I've therefore added the Community label here and will discuss with the team boosting its priority.
Verified in Zed commit 28f95a3.
The output is now a duration type as was originally anticipated.
$ zq -version
Version: v1.2.0-64-g28f95a3c
$ echo '{ts:2018-03-24T17:30:20Z}' | zq 'cut delta:=(ts+1s)-ts' -
{delta:1s}
Thanks @nwt!