This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin1.dll bug in ftime


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]