Article View: borland.public.jbuilder.java.language
Article #7822Re: Problem with time zones ...
From: John McGrath TeamB
Date: Thu, 17 May 2001 02:20
Date: Thu, 17 May 2001 02:20
51 lines
2874 bytes
2874 bytes
On 15 May 2001 07:56:55 -0700, Edwin G๏ฟฝnthner wrote:
> It runs on my machine, but I fear I first have to tell my
> customer that he needs to install the cygwin stuff. You see,
> the last time he couldnt run your program, so we compiled a
> version using MFC. But now we dont have the source; so we
> first need to install the cygwin dlls.
Sorry, I did not realize that the default linking required the cygwin
DLLs. I could try to figure out how to link a static version, but it
is easier to just post the code I used. Here it is:
#include <time.h>
int main() {
time_t now = time( 0 );
struct tm * tmb = localtime( &now );
char str[80];
now = time( 0 );
tmb = localtime( &now );
strftime( str, 80, "%a, %d-%b-%Y, %H:%M:%S %z", tmb );
printf( "time = %d\n\n", now );
printf( "strftime: %s\n\n", str );
printf( "tm:\n" );
printf( " tm_sec = %d\n", tmb->tm_sec );
printf( " tm_min = %d\n", tmb->tm_min );
printf( " tm_hour = %d\n", tmb->tm_hour );
printf( " tm_mday = %d\n", tmb->tm_mday );
printf( " tm_mon = %d\n", tmb->tm_mon );
printf( " tm_year = %d\n", tmb->tm_year );
printf( " tm_wday = %d\n", tmb->tm_wday );
printf( " tm_yday = %d\n", tmb->tm_yday );
printf( " tm_isdst = %d\n", tmb->tm_isdst );
printf( "\n_daylight = %d\n", _daylight );
printf( "\n_timezone = %ld\n", _timezone );
}
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.156c04e09869e71998a1e4@forums.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!newspump.sol.net!news.maxwell.syr.edu!grolier!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3af7da0f$1_2@dnews> <MPG.1562bdeacce5495b98a1b2@forums.borland.com> <3afa34d2$1_1@dnews> <MPG.156424c7a806f3d698a1c5@forums.borland.com> <3afbf3c7$1_2@dnews> <MPG.1566cf03d4ac0c0f98a1cc@forums.borland.com> <3afff6b7$1_1@dnews> <MPG.156aa7bdce6d7fe998a1da@forums.borland.com> <3b0143b7$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,a59c8cd977ce05a X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-16 19:42:02 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.language Subject: Re: Problem with time zones ... Date: Wed, 16 May 2001 22:20:36 -0400 Message-ID: <MPG.156c04e09869e71998a1e4@forums.borland.com> References: <3af7da0f$1_2@dnews> <MPG.1562bdeacce5495b98a1b2@forums.borland.com> <3afa34d2$1_1@dnews> <MPG.156424c7a806f3d698a1c5@forums.borland.com> <3afbf3c7$1_2@dnews> <MPG.1566cf03d4ac0c0f98a1cc@forums.borland.com> <3afff6b7$1_1@dnews> <MPG.156aa7bdce6d7fe998a1da@forums.borland.com> <3b0143b7$1_2@dnews> X-Newsreader: MicroPlanet Gravity v2.30 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 990066035 209.92.40.60 (16 May 2001 19:20:35 -0700) Lines: 51 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!newspump.sol.net!news.maxwell.syr.edu!grolier!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews