This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Different output of strftime in GCC/Cygwin compared to other compilers/OS
- To: "'cygwin at sourceware dot cygnus dot com'" <cygwin at sourceware dot cygnus dot com>
- Subject: Different output of strftime in GCC/Cygwin compared to other compilers/OS
- From: Mathis Severin <Severin dot Mathis at swisslife dot ch>
- Date: Tue, 22 Aug 2000 16:31:59 +0200
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);
printf("-->%s<--\n", theString);
return(0);
}
Best regards,
Severin Mathis
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com