Thanks for answering Bob. Did not work. I tried the commands (echo $TZ, env -i date -R) as regular user and then as root. Bellow, the results (">" precedes all comands just to show the prompt lines.
The "env -i date -R" command still gives different results as regular user (bruno) and root. The last comands is "cat /etc/timezone". Bruno > [EMAIL PROTECTED] ~]$ echo $TZ > > [EMAIL PROTECTED] ~]$ set | grep -i tz > LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:' > [EMAIL PROTECTED] ~]$ env -i date -R > Tue, 18 Sep 2007 22:19:27 +0000 > [EMAIL PROTECTED] ~]$ su - > Password: > [EMAIL PROTECTED] ~]# echo $TZ > > [EMAIL PROTECTED] ~]# set | grep -i tz > LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:' > [EMAIL PROTECTED] ~]# env -i date -R > Tue, 18 Sep 2007 19:20:01 -0300 > [EMAIL PROTECTED] ~]# cat /etc/timezone > America/[EMAIL PROTECTED] ~]# > [EMAIL PROTECTED] (Bob Proulx) writes: > Bruno wrote: > > When I log as root, date gets the wright date and shows it to me. When > > I log as a user (any user that is not root), it shows the date plus > > three hours. > > > > The strange thing is that the system date is correct, but is shows > > "wrong" date to regular users and correct date to root (and only for > > root as far as I can see). > > This sounds to me like one of the two have the TZ environment variable > set in the environment and the TZ variable is different from the > system default value. > > echo $TZ > > Use 'env -i' to force an empty environment and remove any influence > from it. Does this give the correct time? > > env -i date -R > > Some combination of these things are probably the problem. If the > problem is the TZ variable then this simply needs to be found where it > is being set and removed. If the problem is the system time zone then > reconfiguring /etc/timezone for the correct timezone. If the system > time itself is off then setting the system time may be needed. > Running NTP to keep the clock updated is recommended. > > Bob > -- ----------------------------------------- Bruno Muller Junior em 18/09/2007 _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils