[TUHS] Three-quarters to the next Epoch

Steve Nickolas usotsuki at buric.co
Sun Jan 24 22:21:14 AEST 2021


On Sun, 24 Jan 2021, Michael Kjörling wrote:

> On 23 Jan 2021 21:44 -0800, from ality at pbrane.org (Anthony Martin):
>>> That was January 14, 2021, right?
>>
>> % for(i in `{seq 0 2 8}) date -u 0x$i^0000000
>> Thu Jan  1 00:00:00 GMT 1970
>> Mon Jan  5 18:48:32 GMT 1987
>> Sat Jan 10 13:37:04 GMT 2004
>> Thu Jan 14 08:25:36 GMT 2021
>> Tue Jan 19 03:14:08 GMT 2038
>> %
>
> GNU date would appear to agree:
>
> $ date --utc --date=@$(printf '%d' 0x60000000)
> Thu 14 Jan 2021 08:25:36 UTC
> $
>
> (At least the version I've got handy doesn't seem to like a hex
> seconds-since-epoch timestamp, so a separate conversion to decimal is
> required in that case.)

I have a non-GNU one (as part of an unfinished *x I was developing) that 
also doesn't like that, so it required this:

   $ date -ur $(echo "ibase=16;60000000" | bc)
   Thu Jan 14 08:25:36 UTC 2021

Says it was pulled from a 2019 commit to OpenBSD.

-uso.


More information about the TUHS mailing list