[nSLUG] Odd things from date version 8.13

Gerald Ruderman linux at zdoit.airpost.net
Fri Apr 26 13:48:48 ADT 2013


Ben,

$ date -d "1 minute ago"; date
Fri Apr 26 16:43:54 UTC 2013
Fri Apr 26 16:43:54 UTC 2013

$ date -d "- 1 minute"; date
Fri Apr 26 16:44:06 UTC 2013
Fri Apr 26 16:45:06 UTC 2013

gerald at buyvm:~$ date -d " 17:00 - 1 minute"; date
Fri Apr 26 18:01:00 UTC 2013
Fri Apr 26 16:45:19 UTC 2013

The "- 1" was a time zone adjustment since it followed a time.

gerald at buyvm:~$ date -d " 17:00  1 minute ago"; date
Fri Apr 26 16:59:00 UTC 2013
Fri Apr 26 16:45:33 UTC 2013

Probably other ways to do it.

Gerald

On 4/26/13 12:54 PM, Ben Armstrong wrote:
. . . .
> 
> For bonus points, subtract one minute in your own timezone. (I know the
> answer already. Just wondering if people know how to read the doc. :)
> 
> Ben


More information about the nSLUG mailing list