[nSLUG] Odd things from date version 8.13

Ben Armstrong synrg at sanctuary.nslug.ns.ca
Fri Apr 26 14:01:50 ADT 2013


On 26/04/13 01:48 PM, Gerald Ruderman wrote:
> 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

yup. 'ago' is what i found in the info page.

> Probably other ways to do it.

$ date -d "17:00 today - 1 min"
Fri Apr 26 16:59:00 ADT 2013

Ben



More information about the nSLUG mailing list