delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/01/27/11:03:53

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 27 Jan 2012 17:02:50 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: date command shows time 20 minutes into future
Message-ID: <20120127160250.GB22449@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAPJ9Yc_tZLi+4ba_0esNzwb5pgHKJvv3cky72g2vSd17udhgrg AT mail DOT gmail DOT com> <20120127124827 DOT GA22449 AT calimero DOT vinschen DOT de> <4F22BAB4 DOT 6040607 AT hones DOT org DOT uk>
MIME-Version: 1.0
In-Reply-To: <4F22BAB4.6040607@hones.org.uk>
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 Jan 27 14:54, Cliff Hones wrote:
> On 27/01/2012 12:48, Corinna Vinschen wrote:
> > On Jan 27 10:50, David Balažic wrote:
> >> Hi!
> >>
> >> I'm running an up to date version of cygwin (update a week ago or so)
> >> on Windows XP Pro SP3.
> >>
> >> Today I noticed the date command prints the wrong time:
> >>  - actual wall clock time: 10:47
> >>  - date output: Fri Jan 27 11:07:38 CEST 2012
> >>  - date -u: Fri Jan 27 10:08:01 UTC 2012
> >>  - windows system time (as in systray) : 10:48
> >>
> >> Any clue?
> > 
> > I don't know where you get the CEST from, but other than that the time
> > problem should be at least partially solved in the snapshots.  The
> > difference from system time shouldn't become more than 40 ms.
> 
> I think the CEST comes from Windows. If you don't have TZ set,
> I think Cygwin turns the timezone names Windows provides into
> abbreviated names by taking the leading letters.
> 
> So Windows "Central European Standard Time" => CEST
> and "Central European Daylight Time" => CEDT
> 
> I've never liked this - arguably Windows is wrong to use non-standard
> naming for the timezones.  It's even worse for us in the UK - we get
> GMTST and GMTDT - ugh.  [UK may be a little unusual, but perfectly
> reasonable in using GMT and BST.]

Uh, right.  Thanks for reminding me.  The problem is of course that we
only have this information source, if the environment variable TZ isn't
set.  Worse, the Windows timezone name is potentially language dependent.
Therefore a simple translation table is not sufficient.  It would require
some registry scanning.  Setting TZ is much simpler.


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