| delorie.com/archives/browse.cgi | search |
| Date: | Tue, 12 Apr 1994 15:21:51 -0400 |
| From: | davis AT amy DOT tch DOT harvard DOT edu ("John E. Davis") |
| To: | djgpp AT sun DOT soe DOT clarkson DOT edu |
| Subject: | ctime bug? |
Hi,
Consider the following program:
#include <stdio.h>
#include <time.h>
int main ()
{
time_t clock;
clock = time((time_t *) NULL);
puts((char *) ctime(&clock));
return 0;
}
When compiled under BCC, it gives the same time as DOS. However, when
compiled under gcc (from 1.11 maint4), it reports a time that is one hour
earlier. Is this a bug?
--John
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |