bug-coreutils
[Top][All Lists]
Advanced

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

Re: strange date


From: Bob Proulx
Subject: Re: strange date
Date: Tue, 18 Sep 2007 16:51:44 -0600
User-agent: Mutt/1.5.9i

Bruno wrote:
> 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.

When things behave differently between root and non-root and the
environment is the same then I would suspect permission issues.
Probably root can read a file that has restrictive permissions for the
non-root user.

> > address@hidden ~]$ env -i date -R
> > Tue, 18 Sep 2007 22:19:27 +0000

Note the non-root user is UTC.

> > address@hidden ~]# env -i date -R
> > Tue, 18 Sep 2007 19:20:01 -0300

The root user is -0300.

> > address@hidden ~]# cat /etc/timezone
> > America/address@hidden ~]#

I expected to see a newline on the end of that file.

Try these things.  I suspect that the non-root user is not able to
read the timezone file or perhaps the localtime file.

  LC_ALL=C strace -e trace=file date -R

Also what are the permissions on the /etc/localtime file?

  ls -ld /etc/localtime

  ls -ldL /etc/localtime

Bob




reply via email to

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