LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Update on the Gnu date problem

[ILUG] Update on the Gnu date problem

paul at clubi.ie paul at clubi.ie
Tue Apr 10 15:33:55 IST 2007


On Tue, 10 Apr 2007, paul at clubi.ie wrote:

> If so, you can apparently adjust the time used in these relative 
> time modifications, so something like:
>
>  "0800 today 3 weeks ago"
>
> /might/ avoid that problem..

Also, the coreutils manual mentions a solution to a similar boundary 
problem with months:

   The fuzz in units can cause problems with relative items. For
   example, 2003-07-31 -1 month might evaluate to 2003-07-01, because
   2003-06-31 is an invalid date. To determine the previous month more
   reliably, you can ask for the month before the 15th of the current
   month. For example:

        $ date -R
        Thu, 31 Jul 2003 13:02:39 -0700
        $ date --date='-1 month' +'Last month was %B?'
        Last month was July?
        $ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!'
        Last month was June!

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
Karl's version of Parkinson's Law:  Work expands to exceed the time alloted it.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell