Bug 167502 - strange date command output
strange date command output
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-03 07:13 EDT by Yoshinari Takaoka
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-12 08:28:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yoshinari Takaoka 2005-09-03 07:13:08 EDT
Description of problem:

date command output is strange.
timezone output is correct, but time output is strange.

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

glibc.i686 2.3.90-10 or glibc.i686 2.3.90-11
coreutils-5.2.1-52

How reproducible:

always

Steps to Reproduce:
1. boot system and log in to the fedora core as normal user.
2. type 'date' command
  
Actual results:

Sat Sep  3 00:28:03 GMT+9 JST 2005

Expected results:

Sat Sep  3 18:28:03 GMT+9 JST 2005

Additional info:

1. configuration of /etc/sysconfig/clock is as follows.

ZONE="Asia/Tokyo"
UTC=false
ARC=false

2. md5sum value of /etc/localtime and /usr/share/zoneinfo/Asia/Tokyo
are same, so /etc/localtime file is not broken.

3. command output 'hwclock -r' is normal, so hwclock/kernel
 is correct.
  
4. % TZ='Asia/Tokyo'; export TZ
   % date
   Sat Sep  3 18:28:55 GMT+9 JST 2005

this is ok, so tzdata is normal.

5. Probably, glibc package makes localtime() output strange, 
because its output of the system log was correct until glibc package update.
Comment 1 Yoshinari Takaoka 2005-09-03 07:18:38 EDT
Additional info:
4. % TZ='Asia/Tokyo'; export TZ
   % date
   Sat Sep  3 18:28:55 JST 2005

is correct. sorry for mistake.
Comment 2 Yoshinari Takaoka 2005-09-03 07:59:43 EDT
later glibc version(glibc.i686 2.3.90-11) causes this problem, i guess.
but i don't know which version causes it exactly. 
Comment 3 Jakub Jelinek 2005-09-05 03:08:59 EDT
Sorry, can't reproduce here, get in both cases correct output.
Furthermore, there were no changes in glibc time handling code since FC4 glibc.
Guess you can try
strace -s1024 -o /tmp/noenv date
strace -s1024 -E TZ=Asia/Tokyo -o /tmp/env date
and attach here the output in case there is something interesting in there.

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