Archaic wrote:

I need a computer to log everything as UTC. I need the users to be able
to choose their own timezone. Easy enough. I cp /usr/share/zoneinfo/UTC
to /etc/localtime and set TZ in ~/.bash_profile to EST. The problem is
with the bash prompt which I have set to display the time.

According to info bash. \@ is the time in 12 hour format. That seems to
derive timezone from /etc/localtime so I thought I would use \D{format}
where format is an strftime code. After reading strftime(3), it says
that TZ is used. Apparently not. All files/dirs are shown in EST, so the
TZ is being properly exported, yet the prompt still shows UTC instead of
the desired EST.

Any suggestions on how to solve this?

Could you set `date %Z <whatever time zone>` in .bashrc or .bash_profile for each user? Or PS1 for each user in this format?

I can't take credit for coming up with this on my own. I searched the "Advanced Bash-Scripting Guide"--available at:

http://www.tldp.org/LDP/abs/html/

--for "bash prompt." The bibliography lead me to "The Bash Prompt HOWTO" at TLDP. I got the idea from putting this all together.

Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to