public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: DJ Delorie <dj@delorie.com>
To: Stefan.Weil@de.heidelberg.com
Cc: cygwin@sourceware.cygnus.com
Subject: Re: Daylight saving bug in winsup/times.cc
Date: Tue, 23 Mar 1999 09:54:00 -0000	[thread overview]
Message-ID: <199903231529.KAA15963@envy.delorie.com> (raw)
In-Reply-To: < 7B9327EED0AAD211B0750090270F68EC2A16E9@hdhexmbx02.ger02.heidelberg.com >(Stefan.Weil@de.heidelberg.com)

> (gdb) p tz
> $9 = {Bias = -60, StandardName = {87, 101, 115, 116, 101, 117, 114, 111,
> 112,
>     228, 105, 115, 99, 104, 101, 32, 78, 111, 114, 109, 97, 108, 122, 101,
>     105, 116, 0, 0, 0, 0, 0, 0}, StandardDate = {wYear = 0, wMonth = 10,
>     wDayOfWeek = 0, wDay = 5, wHour = 3, wMinute = 0, wSecond = 0,
>     wMilliseconds = 0}, StandardBias = 0, DaylightName = {87, 101, 115, 116,
>     101, 117, 114, 111, 112, 228, 105, 115, 99, 104, 101, 32, 83, 111, 109,
>     109, 101, 114, 122, 101, 105, 116, 0, 0, 0, 0, 0, 0}, DaylightDate = {
>     wYear = 0, wMonth = 3, wDayOfWeek = 0, wDay = 5, wHour = 2, wMinute = 0,
>     wSecond = 0, wMilliseconds = 0}, DaylightBias = -60}
>
> According to the Microsoft documentation (see online help from Dev
> Studio), wYear == 0 needs a different algorithm. This algorithm is
> not implemented in function localtime, file winsup/times.cc, so
> localtime fails.
>
> Our registry entry simply says that daylight saving time starts at
> the last (wDay = 5) sunday (wDayOfWeek = 0) in march (wMonth = 3)
> every year (wYear = 0) at 2 AM (wHour = 2, wMinute = 0).  This is
> correct - it starts next sunday! CYGWIN thinks it already has
> started and incorrectly adds 60 minutes.

Cygwin uses the Bias field.  In your example, it's set to -60, which
means that daylight savings time has already started.  The MSDN docs
desribe this field as "Specifies the current bias, in minutes, for
local time translation on this computer."  So, the information in the
Bias field, for your computer, is currently wrong.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

WARNING: multiple messages have this Message-ID
From: DJ Delorie <dj@delorie.com>
To: Stefan.Weil@de.heidelberg.com
Cc: cygwin@sourceware.cygnus.com
Subject: Re: Daylight saving bug in winsup/times.cc
Date: Wed, 31 Mar 1999 19:45:00 -0000	[thread overview]
Message-ID: <199903231529.KAA15963@envy.delorie.com> (raw)
Message-ID: <19990331194500._L3n2av2NOSv2WhbMh0u8w4S90FvP7PHj2kNdWqlM-g@z> (raw)
In-Reply-To: <7B9327EED0AAD211B0750090270F68EC2A16E9@hdhexmbx02.ger02.heidelberg.com>

> (gdb) p tz
> $9 = {Bias = -60, StandardName = {87, 101, 115, 116, 101, 117, 114, 111,
> 112,
>     228, 105, 115, 99, 104, 101, 32, 78, 111, 114, 109, 97, 108, 122, 101,
>     105, 116, 0, 0, 0, 0, 0, 0}, StandardDate = {wYear = 0, wMonth = 10,
>     wDayOfWeek = 0, wDay = 5, wHour = 3, wMinute = 0, wSecond = 0,
>     wMilliseconds = 0}, StandardBias = 0, DaylightName = {87, 101, 115, 116,
>     101, 117, 114, 111, 112, 228, 105, 115, 99, 104, 101, 32, 83, 111, 109,
>     109, 101, 114, 122, 101, 105, 116, 0, 0, 0, 0, 0, 0}, DaylightDate = {
>     wYear = 0, wMonth = 3, wDayOfWeek = 0, wDay = 5, wHour = 2, wMinute = 0,
>     wSecond = 0, wMilliseconds = 0}, DaylightBias = -60}
>
> According to the Microsoft documentation (see online help from Dev
> Studio), wYear == 0 needs a different algorithm. This algorithm is
> not implemented in function localtime, file winsup/times.cc, so
> localtime fails.
>
> Our registry entry simply says that daylight saving time starts at
> the last (wDay = 5) sunday (wDayOfWeek = 0) in march (wMonth = 3)
> every year (wYear = 0) at 2 AM (wHour = 2, wMinute = 0).  This is
> correct - it starts next sunday! CYGWIN thinks it already has
> started and incorrectly adds 60 minutes.

Cygwin uses the Bias field.  In your example, it's set to -60, which
means that daylight savings time has already started.  The MSDN docs
desribe this field as "Specifies the current bias, in minutes, for
local time translation on this computer."  So, the information in the
Bias field, for your computer, is currently wrong.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


  parent reply	other threads:[~1999-03-23  9:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-23  0:11 Weil, Stefan 7732 EPE-24
     [not found] ` < 7B9327EED0AAD211B0750090270F68EC2A16E9@hdhexmbx02.ger02.heidelberg.com >
1999-03-23  9:54   ` DJ Delorie [this message]
1999-03-31 19:45     ` DJ Delorie
1999-03-31 19:45 ` Weil, Stefan 7732 EPE-24
2003-10-15 13:55 Vanlerberghe Ignace
2003-10-15 14:18 Jörg Schaible
2003-10-16  8:10 Vanlerberghe Ignace
2003-10-16  8:34 ` Lapo Luchini
     [not found] <A0CD6D6944B6A54594122F0A5201257B0C8E82@ntdatakor4.datakor.local>
2003-10-16 10:29 ` Lapo Luchini
2003-10-16 10:41 Jörg Schaible

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=199903231529.KAA15963@envy.delorie.com \
    --to=dj@delorie.com \
    --cc=Stefan.Weil@de.heidelberg.com \
    --cc=cygwin@sourceware.cygnus.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).