[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time-stamp problem

From: Sebastian Luque
Subject: Re: time-stamp problem
Date: Sat, 04 Dec 2004 00:41:00 GMT
User-agent: KNode/0.8.1


This turned out to be a lot more complex and confusing than I thought. I seem
to have magically solved the problem by setting time-stamp-time-zone to nil
(yes, that's right!) but leaving time-stamp-format set to:

%3a, %02d %3b %:y, at %02H:%02M:%02S %Z

The last %Z stands for the timezone. With this, time-stamp is stamping files
with the correct time AND my correct timezone string! I don't have the TZ
variable set in my environment, so I have no idea where in the world
time-stamp is getting its timezone string from. So the problem is solved, but
I don't what is going on.

nick wrote:

> It is probably the case that setting these to "CST" does not work
> because there is no "CST" timezone defined on your system, so it punts
> and uses UTC for the time. E.g. on my system, the timezone info directory
> (/usr/share/zoneinfo - yours might be in a different place) does not
> contain a CST file; on the other hand, it does have a CST6CDT file and
> things seem to work if I set TZ to "CST6CDT".

I can see that file, but also a /usr/share/zoneinfo/Canada/Central which is
what I need.

> But I find it much more 
> convenient to forego explicit settings of environment variables: I
> just make a symlink /etc/localtime to point to the correct timezone
> file:
> $ ls -l /etc/localtime
> lrwxrwxrwx ... /etc/localtime -> /usr/share/zoneinfo/US/Eastern
> and everything just works (as long as /usr is mounted).

I tried this at some point before and found that an init script is rewriting
this info at startup. I'm using a hard disk installation of Knoppix and the
only way I could get the timezone info to be permanently set was to
modify /etc/init.d/knoppix-autoconfig in the following lines:

# American version
# Additional KDE Keyboards

Nonetheless, echo $TZ shows nothing in a shell. Does somebody understand this?

Thank you!

Best wishes,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]