public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Edward McGuire <cygwin.com@metaed.com>
To: cygwin@cygwin.com
Subject: Re: cygcheck's understanding of TZ
Date: Thu, 09 Jun 2011 19:27:00 -0000	[thread overview]
Message-ID: <BANLkTinBqCHvyRpgXpHcXD54ycPuGhrMcg@mail.gmail.com> (raw)
In-Reply-To: <4DF10C13.3040208@cwilson.fastmail.fm>

On Thu, Jun 9, 2011 at 13:08, Charles Wilson wrote:
> cygcheck.exe is not a cygwin program.  It is a native windows
> program, and thus either (a) uses Windows support for time zone
> data, not cygwin, or (b) has some special code to mimic cygwin's
> tz handling, which may not be up-to-par.  You'll have to check the
> source code to be sure, but I rather doubt (b).

cygcheck.cc:
[snip]
#include <sys/time.h>
[snip]
  time_t now;
[snip]
  printf ("\nCygwin Configuration Diagnostics\n");
  time (&now);
  printf ("Current System Time: %s\n", ctime (&now));

It's using C RTL calls. And cygcheck(1) is linked with msvcrt.dll,
not GNU, and therefore cygcheck(1) has Microsoft C RTL behavior.
Microsoft C RTL does not support the pathname syntax extension;
that's a GNU thing.

http://support.microsoft.com/kb/155293/a

Based on the article above, it seems the MS CRTL returns times that
are off by 1 hour if you set TZ and also have daylight saving time
enabled in the Date/Time control panel. That is almost certainly why
cygcheck(1) is returning GMT +1 hour instead of GMT when you pass it
an invalid TZ.

Cheers,

MetaEd

--
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

  reply	other threads:[~2011-06-09 19:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09  7:47 EXCOFFIER Denis
2011-06-09  7:54 ` Thomas Wolff
2011-06-09 17:44   ` Buchbinder, Barry (NIH/NIAID) [E]
2011-06-09 17:39 ` Edward McGuire
2011-06-09 18:08   ` Charles Wilson
2011-06-09 19:27     ` Edward McGuire [this message]
2011-06-09 19:50       ` Denis Excoffier
2011-06-09 21:06         ` Christopher Faylor
2011-06-09 22:01           ` Edward McGuire
2011-06-10  7:25           ` Denis Excoffier
2011-06-10 14:07             ` Edward McGuire
2011-06-10 14:30             ` Christopher Faylor
2011-06-10 17:44               ` Denis Excoffier
2011-06-13 15:07                 ` Edward McGuire
2011-06-13 15:34                   ` Christopher Faylor
2011-06-14 15:05                     ` Lee Maschmeyer
2011-06-14 15:28                       ` Christopher Faylor
2011-06-14 17:30                         ` Lee Maschmeyer
2011-06-14 17:51                           ` Edward McGuire
2011-06-14 18:35                             ` Lee Maschmeyer
2011-06-14 19:19                               ` Edward McGuire
2011-06-14 19:22                                 ` Christopher Faylor
2011-06-14 19:21                           ` Christopher Faylor
2011-06-09 18:58   ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTinBqCHvyRpgXpHcXD54ycPuGhrMcg@mail.gmail.com \
    --to=cygwin.com@metaed.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).