Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C9E8F35.FCD8056C@netstd.com> Date: Mon, 25 Mar 2002 10:45:09 +0800 From: Wu Yongwei Organization: Kingnet Security, Inc. X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygwin1.dll bug in ftime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thank you for your response, and I do see some reasonableness in your message. However, I can hardly calm down unless someone can answer: 1) Why should Cygwin break both backward compatibility with older versions and compatibility Linux? 2) If ftime does not need to get timezone information, how about gettimeofday? I did not read the documentation you quoted (where is it?), but no documentation I read about gettimeofday states that it should ignore the timezone argument. My program used to run on both Cygwin and Linux. But now I even do not know how to make it behave like before except that I try to find an old version of Cygwin and revert to it. Or I could use some ugly macros to define _timezone as timezone in some cases and use _timezone: Cygwin recognizes _timezone as a valid global variable while Linux recognizes only timezone. Anybody enlightens me to show me the right way to go? Or should I abandon running international time-related program on Cygwin in a cross-platform way? Best regards, Wu Yongwei --- Original Message from Christopher Faylor --- On Fri, Mar 22, 2002 at 06:24:00PM +0800, Wu Yongwei wrote: >More tests show that gettimeofday has problems with timezones, too! Calm down. >Just terrible. Yeah, we're mean. int gettimeofday(struct timeval *tp, void *tzp); DESCRIPTION The gettimeofday() function obtains the current time, expressed as seconds and microseconds since 00:00 Coordinated Universal Time (UTC), January 1, 1970, and stores it in the timeval structure pointed to by tp. The resolution of the system clock is unspecified. If tzp is not a null pointer, the behaviour is unspecified. int ftime(struct timeb *tp); DESCRIPTION The ftime() function sets the time and millitm members of the timeb structure pointed to by tp to contain the seconds and milliseconds portions, respectively, of the current time in seconds since 00:00:00 UTC (Coordinated Universal Time), January 1, 1970. The contents of the timezone and dstflag members of tp after a call to ftime() are unspecified. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/