Mail Archives: cygwin/2002/03/24/22:49:01
On Mon, Mar 25, 2002 at 10:45:09AM +0800, Wu Yongwei wrote:
>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?
Basic meanness.
>2) If ftime does not need to get timezone information, how about
>gettimeofday?
Look again. I quoted the Single Unix Specification for both gettimeofday and
ftime.
>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.
http://www.opengroup.org/onlinepubs/7908799/index.html
>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?
You could always submit a patch.
cgf
>--- 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/
--
Please do not send me personal email with cygwin questions.
Use the resources at http://cygwin.com/ .
--
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/
- Raw text -