GNU bug report logs -
#17253
date "--date=-x\ days"
Previous Next
Reported by: hanes <h.feiner <at> gmx.at>
Date: Sat, 12 Apr 2014 18:32:03 UTC
Severity: normal
Tags: moreinfo
Done: Bob Proulx <bob <at> proulx.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17253 in the body.
You can then email your comments to 17253 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#17253
; Package
coreutils
.
(Sat, 12 Apr 2014 18:32:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
hanes <h.feiner <at> gmx.at>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Sat, 12 Apr 2014 18:32:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#17253
; Package
coreutils
.
(Sat, 12 Apr 2014 19:43:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 17253 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
What timezone is the setting for your system? Is it possible that the timesetting is for universal time. Is the bios clock same as the time shown on the screen?
Regards
Leslie
Mr. Leslie Satenstein
SENT FROM MY OPEN SOURCE LINUX SYSTEM.
>________________________________
> From: hanes <h.feiner <at> gmx.at>
>To: 17253 <at> debbugs.gnu.org
>Sent: Saturday, April 12, 2014 11:44 AM
>Subject: bug#17253: date "--date=-x\ days"
>
>
>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
>
>
>
>
>
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#17253
; Package
coreutils
.
(Sat, 12 Apr 2014 19:47:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 17253 <at> debbugs.gnu.org (full text, mbox):
tag 17253 + moreinfo
thanks
hanes wrote:
> 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
Thank you for your report. But I think this is very likely not a bug
in date but a misunderstanding of timezones and daylight saving time.
What is your timezone? You didn't say but that is critical
information. Very likely your timezone went into DST around that
time. You would be better served by using UTC to avoid DST issues.
Please read the FAQ reference on date and say if your problem is
already answered there.
http://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-working-right_002e
Bob
Added tag(s) moreinfo.
Request was from
Bob Proulx <bob <at> proulx.com>
to
control <at> debbugs.gnu.org
.
(Sat, 12 Apr 2014 19:47:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#17253
; Package
coreutils
.
(Sun, 13 Apr 2014 05:57:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 17253 <at> debbugs.gnu.org (full text, mbox):
You got me to the right point with the daylight saving time.
I really do not thought it is that trivial.
So I am sorry to bother You with this, and disgrace me like that.
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.
My timezone switched in that period to summertime, here is the output:
user <at> 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 <at> 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
So, have a nice Day anyway.
with kind regards,
hanes
Reply sent
to
Bob Proulx <bob <at> proulx.com>
:
You have taken responsibility.
(Sun, 13 Apr 2014 20:29:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
hanes <h.feiner <at> gmx.at>
:
bug acknowledged by developer.
(Sun, 13 Apr 2014 20:29:03 GMT)
Full text and
rfc822 format available.
Message #21 received at 17253-done <at> debbugs.gnu.org (full text, mbox):
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 <at> 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 <at> 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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 12 May 2014 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.