GNU bug report logs - #71986
RFC: date @ to support ms.

Previous Next

Package: coreutils;

Reported by: Richard Neill <rn214 <at> cam.ac.uk>

Date: Mon, 8 Jul 2024 03:17:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #28 received at 71986-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Richard Neill <rn214 <at> cam.ac.uk>
Cc: 71986-done <at> debbugs.gnu.org
Subject: Re: bug#71986: RFC: date @ to support ms.
Date: Tue, 9 Jul 2024 14:39:15 +0200
On 7/9/24 03:19, Richard Neill wrote:

> IP_JSON=$(curl https://whatsmyip.dev/api/ip)
> TS=$(echo $IP_JSON | jq '.ts' -r)
> TS=$(echo "$TS/1000" | bc)
> DATE=$(date --date @$TS)

This is better, as it saves on subprocesses:

IP_JSON=$(curl https://whatsmyip.dev/api/ip)
TS=$(jq -nr "$IP_JSON|.ts")
DATE=$(date -d @$((TS / 1000)))


> Anyway, I don't want to waste everyone's time, so if I haven't convinced 
> you, I'll leave it here, and say thank you very much for your 
> consideration.

You're welcome; closing the bug report.





This bug report was last modified 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.