delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/22/10:42:06

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Graham Bloice" <graham DOT bloice AT trihedral DOT com>
To: "Mathis Severin" <Severin DOT Mathis AT swisslife DOT ch>,
<cygwin AT sourceware DOT cygnus DOT com>
Subject: RE: Different output of strftime in GCC/Cygwin compared to other compilers/OS
Date: Tue, 22 Aug 2000 15:43:31 +0100
Message-ID: <000e01c00c47$577c5030$2301a8c0@TUK>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
In-reply-to: <7C05304CF121D411BF4C0008C75D722B01363138@ns9850.swisslife.ch>
Importance: Normal

> -----Original Message-----
> From: cygwin-owner AT sources DOT redhat DOT com
> [mailto:cygwin-owner AT sources DOT redhat DOT com]On Behalf Of Mathis Severin
> Sent: 22 August 2000 15:32
> To: 'cygwin AT sourceware DOT cygnus DOT com'
> Subject: Different output of strftime in GCC/Cygwin compared to other
> compilers/OS
>
>
> Hello
>
> I recognized, that the output of the strftime function from GCC
> under Cygwin
> looks quite different to the output of other compilers. I did not find any
> hint to this difference in documentation or archives. Is there a reason
> behind this or can it be influenced by some settings?
>
> Output of:
> = GCC 2.95.2 on Cygwin 1.2.2
> --> Sat Aug 12 2000 13:23:12
>
> Output of:
> = GCC 2.95 on Redhat Linux 6.0
> = Visual C++ 6.0 on NT 4.0
> = aCC A.01.15 on HP-UX 10.20
> --> 08/12/00 13:23:12
>
> The code I used for this test is:
> #include <time.h>
> #include <stdio.h>
>
> int main(void)
> {
> struct tm theTime;
> char theString[26];
>
>   theTime.tm_sec = 12;    /* seconds after the minute - [0,59] */
>   theTime.tm_min = 23;    /* minutes after the hour - [0,59] */
>   theTime.tm_hour = 13;   /* hours since midnight - [0,23] */
>   theTime.tm_mday = 12;   /* day of the month - [1,31] */
>   theTime.tm_mon = 7;     /* months since January - [0,11] */
>   theTime.tm_year =100;   /* years since 1900 */
>   theTime.tm_wday = 6;    /* days since Sunday - [0,6] */
>   theTime.tm_yday = 225;  /* days since January 1 - [0,365] */
>   theTime.tm_isdst = 1;   /* daylight savings time flag */
>   strftime(theString, sizeof(theString), "%x %X", &theTime);

%x and %X return the date and time representation for the current locale.
Hence the probable cause for the difference.

>   printf("-->%s<--\n", theString);
>   return(0);
> }
>
> Best regards,
> Severin Mathis
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
>

Regards,

Graham Bloice


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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