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

From: Bob Proulx <[email-masked]>
Date: Sat, 12 Apr 2014 13:46:14 -0600

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