Subject: bug#17253: closed (Re: bug#17253: Re: bug#17253: date "--date=-x\ days")

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 13 Apr 2014 20:29:03 +0000

Your bug report

#17253: date "--date=-x\ days"

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17253: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17253
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17253: Re: bug#17253: date "--date=-x\ days"
From: Bob Proulx <[email-masked]>
To: hanes <[email-masked]>
Cc: [email-masked]
Date: Sun, 13 Apr 2014 14:27:59 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

hanes wrote:
> You got me to the right point with the daylight saving time.

All of us were pretty sure that would be the root of the problem.

> I really do not thought it is that trivial.
> So I am sorry to bother You with this, and disgrace me like that.

Please do not worry.  We are happy to help.

> But to answer the Questions:
> I switched my bios clock two hours forward, but of course it had no
> effect; so everything is actually still all right.

You are using a Unix-like system and should be running one of the NTP
daemons to keep your clock adjusted correctly.  I don't know about
Ubuntu but most systems will run an "ntp" daemon to do this.  If you
do, I think you are, then your BIOS setting will not matter because as
soon as the operating system boots it will set the clock to the
correct time from the Internet time servers.

When you say BIOS you really mean the hardware clock.  The hardware
clock is the initial time setting when there isn't any other time
source.  Such as when booting a system without an Internet connection.
In the case of not having an Internet connection then the hardware
clock setting is the best setting available.  But in the case of a
network connection to the Internet time servers then that time will
override the hardware clock time.

So as you can see in a network environment changing the clock from the
BIOS settings will not have any effect!

> My timezone switched in that period to summertime, here is the output:
> user@host - Current Time: 07:42   :~$
> date -d "12:00 today -346 hours" +"Output: %Y.%m.%d__%H  Timezone: %z"
> Output: 2014.03.30__01  Timezone: +0100
> user@host - Current Time: 07:42   :~$
> date -d "12:00 today -345 hours" +"Output: %Y.%m.%d__%H  Timezone: %z"
> Output: 2014.03.30__03  Timezone: +0200

Yes.  If you work with UTC time then you can avoid all of those DST
problems.  But working at 12:00 noon avoids the problem too because no
known timezone changes DST in the middle of the day.

> So, have a nice Day anyway.
> with kind regards,

You too.  I am marking this bug as closed with this message.

Bob

Subject: date "--date=-x\ days"
From: hanes <[email-masked]>
To: [email-masked]
Date: Sat, 12 Apr 2014 17:44:27 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Tonight (12. of April) in the hour after Midnight I encountered a
missing day when I used the '--date=-13\ days' option.
I can reproduce the bug best, when going backwards in hours;
as far as I can see, there is a hour missing on 30. of March between 01
and 03 O'Clock.

My output is:
date +%Y.%m.%d__%H_%M
2014.04.12__17_28

date +%Y.%m.%d__%H_%M --date=-326\ hours
2014.03.30__03_28

date +%Y.%m.%d__%H_%M --date=-327\ hours
2014.03.30__01_28

I am working on a Ubuntu Linux 64bit Mashine.

with Kind Regards,

hanes