Bug 77818 - time error if /etc/localtime is a symlink
Summary: time error if /etc/localtime is a symlink
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.3
Hardware: i586
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2002-11-14 00:55 UTC by Need Real Name
Modified: 2014-03-17 02:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-11-14 00:55:40 UTC

Attachments (Terms of Use)

Description Need Real Name 2002-11-14 00:55:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461)

Description of problem:
If /etc/localtime is a symlink to /usr/share/zoneinfo/America/Vancouver then 
when the system comes up it seems to take the time as UTC instead of PST (and 
so drops 8 hours).  If it is a copy of the file then all is well.  This has 
only recently started happening after months of correct operation (at least it 
seemed to be working correctly).
More specifically (and confusingly).  At the point in /etc/rc.d/rc.sysinit 
where hwclock and date are run I have confirmed that the flags passed to 
hwclock are "--hctosys --localtime" but the result of the "date" command 
displays the correct date and time, except it states that the time is UTC 
instead of PST.  By the time that the initialisation is complete and I get the 
chance to log in "date" returns a time 8 hours earlier but now states that the 
time is PST rather than UTC.

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

How reproducible:

Steps to Reproduce:
1.ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime
2.shutdown -r now

Actual Results:  As it goes through the initialisation I see
Setting clock (localtime) : <whatever> UTC

Expected Results:  As it goes through the initialisation I expect to see
Setting clock (localtime) : <whatever> PST

Additional info:

The issue for me is that the solutions on the newsgroups generally involve 
using a symlink rather than copying the file.

Comment 1 Bill Nottingham 2002-11-14 00:59:55 UTC
If it's a symlink to /usr, and /usr isn't mounted that early when hwclock sets
the time....

That's why we keep it a file. :)

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