Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5428: No <ctime> function in Windows CE 6.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-05-16 08:31:42
#5428: No <ctime> function in Windows CE 6.0
--------------------------------------------------------+-------------------
Reporter: Akira Takahashi <faithandbrave@â¦> | Owner: az_sw_dude
Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
Version: Boost 1.46.1 | Severity: Problem
Resolution: | Keywords:
--------------------------------------------------------+-------------------
Comment (by zerhud@â¦):
SQLite3 do this (#if SQLITE_OS_WINCE)
{{{
struct tm *__cdecl localtime(const time_t *t)
{
static struct tm y;
FILETIME uTm, lTm;
SYSTEMTIME pTm;
sqlite3_int64 t64;
t64 = *t;
t64 = (t64 + 11644473600)*10000000;
uTm.dwLowDateTime = (DWORD)(t64 & 0xFFFFFFFF);
uTm.dwHighDateTime= (DWORD)(t64 >> 32);
FileTimeToLocalFileTime(&uTm,&lTm);
FileTimeToSystemTime(&lTm,&pTm);
y.tm_year = pTm.wYear - 1900;
y.tm_mon = pTm.wMonth - 1;
y.tm_wday = pTm.wDayOfWeek;
y.tm_mday = pTm.wDay;
y.tm_hour = pTm.wHour;
y.tm_min = pTm.wMinute;
y.tm_sec = pTm.wSecond;
return &y;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5428#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC