X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 18 Nov 2010 12:45:06 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Problem with date after date is modified in scripts
Message-ID: <20101118114506.GE18309@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <loom.20101113T105526-546@post.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <loom.20101113T105526-546@post.gmane.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Nov 13 10:03, Raman Ravi wrote:
> Hi
> 
> I have a test harness, on WIndows 2k3, which has 3 sh scripts (the terminal
> is using tcsh)
> 
> runtests
> calls startup.sh
> run.sh
> shutdown.sh
> 
> 1. In startup.sh, I have to change the date to 235830 of the current day-
> so I call
> 
> date $mm${dd}2358.30
> 
> This works fine
> 
> 2. After the test is run using run.sh
> 
> 3. In shutdown.sh, I set the machine clock back to "normal" by syncing
> with a different server, using
> 
> net time "\\TMSERVER" /set /yes
> 
> Here is the issue:
> The windows clock shows the correct time but when I run date in
> any shell (newly created or existing)
> 
> the date is being returned as though step 3 did not ever happen.
> 
> At this point of time, the machine time is 2010-11-13 02:01:00 but
> date in a tcsh/bash is reporting it as
> 
> Sun Nov 14 03:37:43 PST 2010
> 
> WOuld appreciate some help in understanding and more importantly resolving
> this issue.

This is a shortcoming in Cygwin itself.  You can only workaround it
by setting the date from a Cygwin process for now.  This will only
affect Cygwin processes running in the same user session, though.
There's a TODO in the affected code in Cygwin which describes this
very problem.  Unfortunately this requires a redesign of the code
in question...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

