delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/10/07:37:19

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 10 Jul 2001 13:35:41 +0200
From: Corinna Vinschen <cygwin AT cygwin DOT com>
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: CRON and time
Message-ID: <20010710133541.P8578@cygbert.vinschen.de>
Mail-Followup-To: cygwin <cygwin AT cygwin DOT com>
References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010710004537 DOT 05a224d8 AT imap DOT local DOT mscha DOT com> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010628134148 DOT 03478e48 AT imap DOT mscha DOT org> <D8D1A6A7110BD51188B600E018C673D02D9843 AT ross DOT dorotech DOT fr> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010628134148 DOT 03478e48 AT imap DOT mscha DOT org> <20010709121124 DOT I8578 AT cygbert DOT vinschen DOT de> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010710004537 DOT 05a224d8 AT imap DOT local DOT mscha DOT com> <20010710122716 DOT M8578 AT cygbert DOT vinschen DOT de> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010710124746 DOT 03f403b0 AT imap DOT local DOT mscha DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <5.1.0.14.2.20010710124746.03f403b0@imap.local.mscha.com>; from cygwin@mscha.com on Tue, Jul 10, 2001 at 12:55:20PM +0200

On Tue, Jul 10, 2001 at 12:55:20PM +0200, Michael Schaap wrote:
> However, one thing is funny.  My test crontab had a command like "date >> 
> /tmp/hello.txt", and that behaves slightly different with this version of cron.
> When I run date from the cron-3.0.1-2 version, or when I run date from the 
> command line, I get output like:
>          Tue Jul 10 12:49:29  2001
> But when I run it with this freshly compiled cron, I get:
>          Tue Jul 10 12:49:00 T-1 2001
> I guess both are incorrect, from a UNIX point of view, and the second one 
> is actually a bit better than the first one...

That's very likely related to your TZ setting. Since cron is running
under LocalSystem account it gets only the system default environment
without any user specific addition, even after switching the user
context which only modifies the environment slightly. The difference
is that the old cron had practically no environment except what it
sets by itself.

Try a command "* * * * * env > /tmp/foo" to see the environment you get.

If the date output is somehow vital for you, just set TZ in either the
system environment (which requires a reboot *sob*) or - preferred IMO -
set TZ in your crontab file.

Thanks for your test, I will upload the -4 version now to sourceware.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019