From owner-freebsd-questions@FreeBSD.ORG Sun Oct 5 11:02:22 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D820016A4B3 for ; Sun, 5 Oct 2003 11:02:22 -0700 (PDT) Received: from out001.verizon.net (out001pub.verizon.net [206.46.170.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68A6143FF5 for ; Sun, 5 Oct 2003 11:02:21 -0700 (PDT) (envelope-from cswiger@mac.com) Received: from mac.com ([68.237.14.199]) by out001.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20031005180220.OAKO5382.out001.verizon.net@mac.com>; Sun, 5 Oct 2003 13:02:20 -0500 Message-ID: <3F805CA8.7010408@mac.com> Date: Sun, 05 Oct 2003 14:02:16 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030925 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd@kibserv.org References: <1065316286.850.30.camel@butters> In-Reply-To: <1065316286.850.30.camel@butters> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out001.verizon.net from [68.237.14.199] at Sun, 5 Oct 2003 13:02:20 -0500 cc: freebsd-questions@freebsd.org Subject: Re: seperating user timezones from system timezones X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2003 18:02:23 -0000 Mailing Lists Catcher wrote: > How to I allow users access to their own timezone without affecting the > system processes? > > All of my systems regardless of location have always been set to UTC so > logs and cron are in sync across timezones. Hmm. Unix has understood the notion of 'local time' versus UTC and most programs do the right thing even if you set the timezone for the entire system-- things like ntpd will syncronize via UTC even if TZ was set in their environment. If you want to run syslogd and cron in UTC, I believe you could do so by setting something like this in /etc/rc.conf: cron_program='/usr/bin/env TZ=UTC /usr/sbin/cron' syslogd_program='/usr/bin/env TZ=UTC /usr/sbin/syslogd' > Recently I have had need to allow users to set their own timezone in the > .cshrc using: > sentenv TZ America/Detroit > or > sentenv TZ America/Denver > or whatever applies. Of course, you meant 'setenv' and not 'sentenv'. > But what I am finding out is that as long as the user is logged in it > sets the environment for the entire system affecting log timestamps as > well as cron events. Unless you set TZ in /etc/profile, it should not have a universal effect. Are you sure you didn't kill and restart syslogd as root with TZ configured to a non-UTC timezone? Maybe try setting TZ only if the shell is interactive, by adding the setenv after the line "if ($?prompt) then"...? -- -Chuck