public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Time Functions?
@ 1997-10-21  3:41 Keet / Foxbird
  0 siblings, 0 replies; 7+ messages in thread
From: Keet / Foxbird @ 1997-10-21  3:41 UTC (permalink / raw)
  To: gnu-win32

I compiled a nice little server and am having a few little problems with
the time functions. I've used strftime() in C++, and a few other functions
in C.. and they all return the wrong time. Specifically CST/CDT rather than
EST. One example would be that my Win95 task bar clock reports 20:32 and
the strftime function reports 19:32. I don't have any way to test if the
time runs correctly in a CST time zone or even a PST. I've tried telling
Win95 that I'm in the CST time zone.. and even the PST time zone, but it
still is one hour behind! Is there a flag I missed, some option, or just
something crazy I didn't notice? Any ideas/comments/help GREATLY appreciated.

- Greg Neujahr
  keetnet@wilmington.net


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Time Functions?
@ 1997-10-23  3:54 Keet / Foxbird
  0 siblings, 0 replies; 7+ messages in thread
From: Keet / Foxbird @ 1997-10-23  3:54 UTC (permalink / raw)
  To: Sergey Okhapkin, gnu-win32, 'Fernandes, Hilton'
  Cc: 'Geoffrey Noer'

At 10:16 AM 10/23/97 +0300, Sergey Okhapkin wrote:
>Fernandes, Hilton wrote:
>> Hi!
>> 
>> When compiled by MSVC++ 4.0 and DJGPP v2.01 the program you sent printed
>> the time correctly.
>> 
>> So it seems the bug is in Cygnus implementation of the time functions.
>
>Time() implementation in cygwin.dll ignores daylight saving time bias.
>

Can you suggest a solution for this odd little problem then? I've tried it
on three different computers, that have 3 different releases of Win95
running (Upgrade Version W/Service Packs, OSR2, and Upgrade W/OUT Service
Packs) and they all seem to be an hour behind. I would try to put it on NT,
but I don't have an NT machine to test it on. Any ideas as to whats wrong,
and a possible solution on how to fix it? (Besides moving to the CST time
zone and leaving my clock at EST time :P )

- Greg Neujahr
  keetnet@wilmington.net



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Time Functions?
@ 1997-10-22 23:18 Sergey Okhapkin
  0 siblings, 0 replies; 7+ messages in thread
From: Sergey Okhapkin @ 1997-10-22 23:18 UTC (permalink / raw)
  To: Keet / Foxbird, gnu-win32, 'Fernandes, Hilton'
  Cc: 'Geoffrey Noer'

Fernandes, Hilton wrote:
> Hi!
> 
> When compiled by MSVC++ 4.0 and DJGPP v2.01 the program you sent printed
> the time correctly.
> 
> So it seems the bug is in Cygnus implementation of the time functions.

Time() implementation in cygwin.dll ignores daylight saving time bias.

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time Functions?
  1997-10-21 14:54 Keet / Foxbird
  1997-10-22  2:40 ` $Bill Luebkert
@ 1997-10-22 20:35 ` Fernandes, Hilton
  1 sibling, 0 replies; 7+ messages in thread
From: Fernandes, Hilton @ 1997-10-22 20:35 UTC (permalink / raw)
  To: Keet / Foxbird, gnu-win32; +Cc: hfernandes

Hi!

When compiled by MSVC++ 4.0 and DJGPP v2.01 the program you sent printed
the time correctly.

So it seems the bug is in Cygnus implementation of the time functions.


Regards,
++Hilton
----
Hilton Fernandes
hfernandes@geocities.com
http://www.geocities.com/SiliconValley/Lakes/5657
URLs and help on C++ programming and Object-Oriented Design
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time Functions?
  1997-10-21 14:54 Keet / Foxbird
@ 1997-10-22  2:40 ` $Bill Luebkert
  1997-10-22 20:35 ` Fernandes, Hilton
  1 sibling, 0 replies; 7+ messages in thread
From: $Bill Luebkert @ 1997-10-22  2:40 UTC (permalink / raw)
  To: Keet / Foxbird; +Cc: Earnie Boyd, gnu-win32

Keet /
Foxbird
wrote:
> 
> At 05:39 AM 10/21/97 PDT, Earnie Boyd wrote:
> >
> >
> >How about the date?  It sounds to me as if WIN95 is reporting Daylight
> >Savings Time and the function is returning Standard Time.
> >
> 
> Just ran the server again to test and report back. The server reports the
> following:
> 
> ------------------STARTING SERVER: 10-21-1997 at 15:59:19------------------
> 
> My computer clock at that exact moment reports 16:59:19 10-21-1997.
> 
> My current configuration for Win95 is as follows:
> 'English' Regional Setting
> Auto Adjust for daylight savings time.
> Can't find a daylight savings time enable/disable option anywhere (BIOS too)
> Eastern US Timezone (-0500 GMT)
> Original Beta 18 (Not the coolview extensions)
> 
> What follows is a breif little snippet that reproduces the problem, at
> least on my end.
> 
> /* TIMETEST.CPP - Produces a time that is one hour behind the correct time
>  *                on a Win95 machine running B18
>  */
> 
> #include <stdlib.h>
> #include <stdio.h>
> #include <time.h>
> 
> main () {
>    time_t        st_t;
>    struct tm     *st_tm;
>    char*         DTarray[2];
>    st_t  = time(0);
>    st_tm = localtime(&st_t);
> 
>    DTarray[0] = (char*)malloc(sizeof(char)*20);
>    strftime(DTarray[0],15,"%m-%d-%Y",st_tm);
> 
>    DTarray[1] = (char*)malloc(sizeof(char)*20);
>    strftime(DTarray[1],15,"%H:%M:%S",st_tm);
> 
> 
>    printf("------------------STARTING SERVER: %s at
> %s",DTarray[0],DTarray[1]);
>    printf("------------------\n", NULL);
> 
>    return 0;
> }
> 
> // **END FILE**
> 
> Another thing I noticed, is that if you have a CYGWIN.DLL in your path, and
> then another in the current directory that your working in, and then
> execute c++, gcc, or any of the compilers, it goes berzerk and throws up
> one of those 'cygwin_except_handler' errors and causes a fatal exception
> error and demands the program be shut down. Just something strange I
> noticed while compiling this little test program.
> 
> Again, any ideas on how to fix these problems, or just suggestions, I'm
> open to try just about anything. Thanks in advance for the help.

If you
print out
tm_isdst,
you get 0
on Win95
which is
wrong, it
should be
1.
Somehow
the
library
isn't
picking up
on the
fact that
DST is in
effect.
I'm not
familiar
enough
with the
code to go
find where
the
problem
is.

-- 
  ,-/- 
__      _ 
_        
$Bill
Luebkert
 (_/   / 
)    //
//      
DBE
Collectibles
  / )
/--<  o //
//     
http://www.wgn.net/~dbe/
-/-'
/___/_<_</_</_   
Email:
dbe@wgn.net
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time Functions?
@ 1997-10-21 14:54 Keet / Foxbird
  1997-10-22  2:40 ` $Bill Luebkert
  1997-10-22 20:35 ` Fernandes, Hilton
  0 siblings, 2 replies; 7+ messages in thread
From: Keet / Foxbird @ 1997-10-21 14:54 UTC (permalink / raw)
  To: Earnie Boyd; +Cc: gnu-win32

At 05:39 AM 10/21/97 PDT, Earnie Boyd wrote:
>
>
>How about the date?  It sounds to me as if WIN95 is reporting Daylight 
>Savings Time and the function is returning Standard Time.
>

Just ran the server again to test and report back. The server reports the
following:

------------------STARTING SERVER: 10-21-1997 at 15:59:19------------------

My computer clock at that exact moment reports 16:59:19 10-21-1997.

My current configuration for Win95 is as follows:
'English' Regional Setting
Auto Adjust for daylight savings time.
Can't find a daylight savings time enable/disable option anywhere (BIOS too)
Eastern US Timezone (-0500 GMT)
Original Beta 18 (Not the coolview extensions)

What follows is a breif little snippet that reproduces the problem, at
least on my end.

/* TIMETEST.CPP - Produces a time that is one hour behind the correct time
 *                on a Win95 machine running B18
 */

#include <stdlib.h>
#include <stdio.h>
#include <time.h>

main () {
   time_t        st_t;
   struct tm     *st_tm;
   char*         DTarray[2];
   st_t  = time(0);
   st_tm = localtime(&st_t);


   DTarray[0] = (char*)malloc(sizeof(char)*20);
   strftime(DTarray[0],15,"%m-%d-%Y",st_tm);

   DTarray[1] = (char*)malloc(sizeof(char)*20);
   strftime(DTarray[1],15,"%H:%M:%S",st_tm);
   

   printf("------------------STARTING SERVER: %s at
%s",DTarray[0],DTarray[1]);
   printf("------------------\n", NULL);

   return 0;
}

// **END FILE**

Another thing I noticed, is that if you have a CYGWIN.DLL in your path, and
then another in the current directory that your working in, and then
execute c++, gcc, or any of the compilers, it goes berzerk and throws up
one of those 'cygwin_except_handler' errors and causes a fatal exception
error and demands the program be shut down. Just something strange I
noticed while compiling this little test program.

Again, any ideas on how to fix these problems, or just suggestions, I'm
open to try just about anything. Thanks in advance for the help.

\---------------------------------------------\
 \  Keet  |  Keetnet@wilmington.net            \
  \---------------------------------------------\
   \ http://localsonly.wilmington.net/~keetnet/  \--\
    \---------------------------------------------\  \
        \ Keet On FurryMUCK, FluffMuck, Moonglow, and \
      /--\ Forgotten Paths                             \
     /    \---------------------------------------------\
    / Furry Code 1.2:                             /
   / FA[parakeet]6fmsw A-- C- D+ H++ M+++ P+ R+  /
  / T++++ W Z Sm RL# a# cn++ d+ e# f++++ h#     /
 / i++>+++ p* sm#                              /
/---------------------------------------------/

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Time Functions?
@ 1997-10-21  5:39 Earnie Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Earnie Boyd @ 1997-10-21  5:39 UTC (permalink / raw)
  To: Keetnet; +Cc: gnu-win32

>Date: Tue, 21 Oct 1997 06:38:53 -0400
>To: gnu-win32@cygnus.com
>From: Keet / Foxbird <Keetnet@wilmington.net>
>Subject: Time Functions?
>
>
>I compiled a nice little server and am having a few little problems 
with
>the time functions. I've used strftime() in C++, and a few other 
functions
>in C.. and they all return the wrong time. Specifically CST/CDT rather 
than
>EST. One example would be that my Win95 task bar clock reports 20:32 
and
>the strftime function reports 19:32. I don't have any way to test if 
the
>time runs correctly in a CST time zone or even a PST. I've tried 
telling
>Win95 that I'm in the CST time zone.. and even the PST time zone, but 
it
>still is one hour behind! Is there a flag I missed, some option, or 
just
>something crazy I didn't notice? Any ideas/comments/help GREATLY 
appreciated.
>

How about the date?  It sounds to me as if WIN95 is reporting Daylight 
Savings Time and the function is returning Standard Time.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-10-23  3:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-21  3:41 Time Functions? Keet / Foxbird
1997-10-21  5:39 Earnie Boyd
1997-10-21 14:54 Keet / Foxbird
1997-10-22  2:40 ` $Bill Luebkert
1997-10-22 20:35 ` Fernandes, Hilton
1997-10-22 23:18 Sergey Okhapkin
1997-10-23  3:54 Keet / Foxbird

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