want BSD-like date -r option
In FreeBSD date there's "-r" option to convert seconds since the Epoch to current date. It would be nice to have this option in illumos date.
Updated by Paul Henson over 5 years ago
GNU coreutils (as used by most Linux distributions) uses -r for:
display the last modification time of FILE
$ date -r /etc/hosts
Tue Jan 6 18:21:09 PST 2015
The behavior you mention is available under Linux with the syntax:
$ date --date='@1444666647'
Mon Oct 12 09:17:27 PDT 2015
No opinion on adding this to illumos, just pointing out however it's done it will be incompatible with another common OS.
Updated by Joshua M. Clulow over 5 years ago
Mac OS X, at least in Yosemite (10.10.2), includes a FreeBSD-compatible -r flag.
$ uname -a Darwin leftbook.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64 $ date -r 0 Wed 31 Dec 1969 16:00:00 PST $ date -r 1000000000 Sat 8 Sep 2001 18:46:40 PDT