Bug 392011 - Incorrect UTC conversion of CST timestamps by the 'date' utility
Summary: Incorrect UTC conversion of CST timestamps by the 'date' utility
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: coreutils
Version: 4.6
Hardware: i686
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Ondrej Vasik
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-20 12:10 UTC by Marc Girod
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-20 12:32:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marc Girod 2007-11-20 12:10:58 UTC
Description of problem:

~> date -u -d 'Nov 19 11:27 CST 2007'
Mon Nov 19 17:27:00 UTC 2007

Note: CST is China Standard Time.
The correct value was: Mon Nov 19 03:27:00 UTC 2007

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

~> rpm -q tzdata
tzdata-2007h-1.el4
~> rpm -q coreutils
coreutils-5.2.1-31.7

How reproducible:

Fully reproducible.

Steps to Reproduce:
1. date -u -d 'Nov 19 11:27 CST 2007'
2. 
3.
  
Actual results:

Mon Nov 19 17:27:00 UTC 2007

Expected results:

Mon Nov 19 03:27:00 UTC 2007

Additional info:

Found first on RHEL 3... with:
tzdata-2003c-1 and coreutils-4.5.3-26

Comment 1 Ondrej Vasik 2007-11-20 12:32:59 UTC
As is mentioned in sourcecodes of getdate.y (coreutils-{version}/lib/) is
impossible to make 3 letters long shortcuts of date without conflicts. For
example - EST is US Eastern standard time and Eastern standard time in Australia
- time zones of course differ. This one is conflict between China standard time
and US Central standard time. 
I will citate source code of coreutils:
"You cannot rely on getdate to handle arbitrary time zone
abbreviations; use numeric abbreviations like `-0500' instead."

So sorry, can't help, NOTABUG


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