Super Pik Master wrote: > I've been trying to print a timestamp format (I mean seconds from 1 Jan > 1970) with `date` program from coreutils package. > There is an option -d but it does not take the numerical timestamp as an > input. > > Is there a chance to enhance the functionality by allowing the above? Or > add an option like -t to read timestamp and then print it in one of > allowed formats. It would be very convenient.
Look at the info documentation under "Examples of date" in the "date invocation" section of the manual. date +%s 1128263085 date --date 'Sun, 02 Oct 2005 08:25:13 -0600' +%s 1128263113 To convert that number back to human readable time use date -R -d '1970-01-01 UTC 1128263113 seconds' Sun, 02 Oct 2005 08:25:13 -0600 Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
