Bug 114871 - TZ variable not able to properly manipulate date
TZ variable not able to properly manipulate date
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: glibc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-02-03 15:14 EST by Timothy Toedebusch
Modified: 2016-11-24 10:28 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-02-09 10:41:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Timothy Toedebusch 2004-02-03 15:14:36 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
I am attempting to manipulate the date to show me the time/date 
exactly 24 hours ago.
I attempt to do this using the following convention from command line 
or in a script:

"TZ=CDT30CST date"  
This should give me a date exactly 24 hours ago, but here is what I 
am seeing:
# date
Tue Feb  3 14:16:02 CST 2004
TZ=CST30CDT date
Mon Feb  2 21:16:03 CST 2004

I am located in the Central time zone and am using bash.

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

How reproducible:

Steps to Reproduce:
1. date; TZ=XXX30YYY date (where XXX and YYY reflect the time zone)

Additional info:
Comment 1 Tim Waugh 2004-02-04 08:06:27 EST
Date just reports what localtime() says.
Comment 2 Jakub Jelinek 2004-02-09 10:41:10 EST
See http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
The hour shall be between zero and 24...
The result of using values outside of this range is unspecified.

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