[COFF] Manipulating time_t values (was: Unix half-billion years old 1985)

Greg 'groggy' Lehey grog at lemis.com
Tue Nov 5 09:00:55 AEST 2019


[Moved to COFF]

On Monday,  4 November 2019 at 16:59:22 -0500, John P. Linderman wrote:
> I wrote a near-trivial "timestamp" command to make it easier to do time
> arithmetic
>
> TZ=udt timestamp
> 119 11 04 21 50 06 18204 1572904206 Mon Nov  4 21:50:06 2019
> TZ=udt timestamp 0
> 70 01 01 00 00 00 0 0 Thu Jan  1 00:00:00 1970
> ...

FreeBSD has this functionality in date(1):

 TZ=UTC date -r 500000000
 Tue  5 Nov 1985 00:53:20 UTC
 TZ=UTC date -r 1500000000
 Fri 14 Jul 2017 02:40:00 UTC

Greg
--
Sent from my desktop computer.
Finger grog at lemis.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191105/63c5e336/attachment.sig>


More information about the COFF mailing list