Bug 392011

Summary: Incorrect UTC conversion of CST timestamps by the 'date' utility
Product: Red Hat Enterprise Linux 4 Reporter: Marc Girod <marc.girod>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 4.6   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-20 12:32:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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