From: ztdl01 AT centuryinter DOT net (Thomas Langenback) Subject: cygwin b20.1 thinks it's 1970!??? 13 Jan 1999 04:57:06 -0800 Message-ID: <369B6D2F.9D003AB1.cygnus.gnu-win32@centuryinter.net> Reply-To: cen16754 AT centuryinter DOT net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com I'm real confused about this, and would appreciate any help that could be offered... The following code (snipped and pieced together from a much larger program), when compiled with CYGWIN B18, and later on a Linux box, produces the expected results. However, when compiled with B20, it says: > The current time is Fri Jan 16 02:31:17 1970 > #include > #include > #include > #include > #include > #include > #include > #include > #include > > > int main( int argc, char **argv ) > { > time_t current_time; > char *time; > struct timeval now_time; > /* > * Init time. > */ > gettimeofday( &now_time, NULL ); > current_time = (time_t) now_time.tv_sec; > time = ctime(¤t_time); > time[strlen(time)-1] = '\0'; > > fprintf(stderr, "The current time is %s\n\r", time); > return 0; > } > Any idea why? Forgive me if the answer is something really obvious... I'm still in the process of learning C. This would be the reason I got the CYGWIN compiler in the first place. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".