Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 88207 - date does not calculate yesterday properly with Standard Time to Day light savings time change
Summary: date does not calculate yesterday properly with Standard Time to Day light sa...
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: coreutils
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-07 17:38 UTC by David Dombek
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-07 19:51:34 UTC

Attachments (Terms of Use)

Description David Dombek 2003-04-07 17:38:51 UTC
Description of problem:
The date command as provided by gnu-sh-utils 2.0.11 does not properly calculate 
the date for yesterday.

date --date=yesterday does NOT work with changes from Standard time to Daylight 
savings time

[root@adsfa root]# date --date=yesterday  
Sat Apr  5 23:27:59 EST 2003

[central@adsfa central]$ date      
Mon Apr  7 00:33:30 EDT 2003

Version-Release number of selected component (if applicable):

How reproducible:
ALL the time

Steps to Reproduce:
1. Set date on computer to Sat, April 7, between 12-1am
2. Run date --date=yesterday
Actual results:
see above

Expected results:
The date program should properly caluclate the date.  It appears the date 
command is just subtracting 24hours from the said time.  This is incorrect.

Additional info:

This may also have a problem in other timezones as Europe changes before the US.

Comment 1 Tim Waugh 2003-04-07 17:50:19 UTC
We don't ship coreutils in Red Hat Linux 9.  Perhaps you meant coreutils 4.5.3.

Comment 2 Tim Waugh 2003-04-07 17:51:42 UTC
Reported upstream.

Comment 3 David Dombek 2003-04-07 18:04:09 UTC
Sorry it is sh-utils.  I thought I selected the correct name.


Comment 4 Tim Waugh 2003-04-07 19:51:34 UTC
I made a mistake typing 'We don't ship coreutils in Red Hat Linux 9'; I meant to
write 'We don't ship sh-utils in Red Hat Linux 9'.  coreutils is the correct

Note You need to log in before you can comment on or make changes to this bug.