delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/30/12:46:12

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 30 Mar 2011 18:45:38 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Resetting time via time server doesn't affect cygwin 'date'
Message-ID: <20110330164538.GB25534@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <f5bpqp8wy7m DOT fsf AT calexico DOT inf DOT ed DOT ac DOT uk> <imvla1$upo$1 AT dough DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <imvla1$upo$1@dough.gmane.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mar 30 18:16, Thorsten Kampe wrote:
> * Henry S. Thompson (Wed, 30 Mar 2011 14:10:37 +0100)
> > I'm running 1.7.9-1 on my 64-bit Windows 7 laptop. I recently noticed
> > that my box was 15 seconds adrift from my Linux desktop. After some
> > minor hassles, I was able to use Clock/Date and Time/Internet
> > Time/Change Settings/Update now to sync with a local ntp server, the
> > same one my desktop is using. At this point the Windows clock on the
> > laptop and my desktop were in sync, but 'date' from a bash window was
> > _still_ 15 seconds out.
> > 
> > Is this a pervasive problem (to test this yourself, just use the
> > Windows UI to set your clock forward a minute, test the 'date' (it
> > should be as per Windows clock), then use the above path to resync
> > with a time server, and observe that 'date' is _not_ adjusted back),
> > or particular to Windows 7/Cygwin 1.7.9?
> 
> I just tested it: I set the time manually back five minutes via the the 
> control panel > Date and Time. The time change was reflected in a Cmd 
> window ("time /t") while a "date" in bash still showed the "old" time (+
> 5min). Where does the bash date gets the time from?!

There's an internal counter which is initialized by the first Cygwin
process started in a session.  So time chanegs made by a Cygwin process
are seen by other Cygwin processes in the same session, but time changes
outside of Cygwin or outside of the same session are not seen, unless all
Cygwin processes in a session are stopped and restarted.  This will be
fixed at one point.


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

- Raw text -


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