Bug 114871 - TZ variable not able to properly manipulate date
Summary: TZ variable not able to properly manipulate date
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: glibc
Version: 2.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-03 20:14 UTC by Timothy Toedebusch
Modified: 2016-11-24 15:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-09 15:41:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Timothy Toedebusch 2004-02-03 20:14:36 UTC
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):
sh-utils-2.0.11-5

How reproducible:
Always

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

Additional info:

Comment 1 Tim Waugh 2004-02-04 13:06:27 UTC
Date just reports what localtime() says.

Comment 2 Jakub Jelinek 2004-02-09 15:41:10 UTC
See http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
Particularly:
The hour shall be between zero and 24...
and
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.