[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: date-madness
From: |
Philip Rowlands |
Subject: |
Re: date-madness |
Date: |
Sun, 12 Dec 2004 00:46:38 +0000 (GMT) |
On Fri, 10 Dec 2004, Mats Blomstrand wrote:
> $ gdate -d "saturday 24:00"
> gdate: invalid date `saturday 24:00'
That's not allowed; the hour must be 00-23, according to the
documentation.
>And it gets even more strange when one asking for calculations:
>
> $ gdate -d "sunday 00:01"
> Sun Dec 12 00:01:00 CET 2004
>
> $ gdate -d "sunday 00:01 +3 hours"
> Sun Dec 12 01:58:07 CET 2004
To rephrase that one and make it a little more obvious what I think's
happening:
$ date -d 'next sunday 00:01 +0003 +1 hour'
i.e. you're asking to offset the timezone by three minutes
To get the calculation you want, try:
$ date -d 'sunday 00:01 3hour'
Cheers,
Phil
- date-madness, Mats Blomstrand, 2004/12/11
- Re: date-madness,
Philip Rowlands <=