Hey Some!
Fun and games with coreutils date;
date --date="2040-01-01 00:00:00+00:00" +%s = 2208988800 seconds
date --date="@2208988800" = Sun Jan 1 00:00:00 UTC 2040
Look Ma! No Unix Millennium Bug!
For the record, coreutils date uses a 64 bit floating point and the largest
integer I've been able to send to it is 67768036191676799 seconds which
produces the date "Wed Dec 31 23:59:59 UTC 2147485547", which is over 2 billion
years in the future. Your milage may vary.
Life is good,
Maurice
... Don't cry for me I have vi.
--- GNU bash, version 4.4.0(1)-rc1 (x86_64-atom-linux-gnu)
* Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001.0)
|