Article View: borland.public.cppbuilder.nativeapi
Article #10094Re: DateTime conversions
From: Remy Lebeau (TeamB)
Date: Thu, 13 May 2004 23:23
Date: Thu, 13 May 2004 23:23
24 lines
1554 bytes
1554 bytes
"nicolasr" <nicolasrNOSPAMATSIGNgmx.net> wrote in message
news:40a40367$1@newsgroups.borland.com...
> How do I convert this time stamp to TDateTime keeping it UTC?
// Converting UTCTime to LocalTime...
FILETIME FileTime, LocalFileTime;
SYSTEMTIME UTCTime, LocalTime;
// fill in UTCTime with your UTC timestamp ...
// probably have to use ::FileTimeToSystemTime()...
::SystemTimeToFileTime(&UTCTIme, &FileTime);
::FileTimeToLocalFileTime(&FileTime, &LocalFileTime);
::FileTimeToSystemTime(&LocalFileTime, &LocalTime);
// Converting SYSTEMTIME to TDateTime...
TDateTime dt = SystemTimeToDateTime(LocalTime);
Gambit
Technical Details
Message-ID:
<40a404b4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40a40367$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ccf61f85df823a6f X-Google-Attributes: gid10cc67,public From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40a40367$1@newsgroups.borland.com> Subject: Re: DateTime conversions Date: Thu, 13 May 2004 16:23:38 -0700 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.138.253 Message-ID: <40a404b4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1084490932 67.22.138.253 (13 May 2004 16:28:52 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail