delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/24/22:49:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sun, 24 Mar 2002 22:48:30 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygwin1.dll bug in ftime
Message-ID: <20020325034830.GD10038@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <3C9E8F35 DOT FCD8056C AT netstd DOT com>
Mime-Version: 1.0
In-Reply-To: <3C9E8F35.FCD8056C@netstd.com>
User-Agent: Mutt/1.3.23.1i

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019