trunk/branch integration: VxWorks & Wince

This commit is contained in:
Marian Krivos 2011-08-23 06:52:24 +00:00
parent e729c102b0
commit 5cdea0c145

View File

@ -289,14 +289,19 @@ void LocalDateTime::determineTzd(bool adjust)
std::tm* broken = std::localtime(&epochTime);
#endif
if (!broken) throw Poco::SystemException("cannot get local time");
_tzd = (Timezone::utcOffset() + ((broken->tm_isdst == 1) ? 3600 : 0));
_tzd = (Timezone::utcOffset() + ((broken->tm_isdst == 1) ? 3600 : 0));
#else
std::tm broken;
if (!localtime_r(&epochTime, &broken))
throw Poco::SystemException("cannot get local time");
_tzd = (Timezone::utcOffset() + ((broken.tm_isdst == 1) ? 3600 : 0));
std::tm broken;
#if defined(POCO_VXWORKS)
if (localtime_r(&epochTime, &broken) != OK)
throw Poco::SystemException("cannot get local time");
#else
if (!localtime_r(&epochTime, &broken))
throw Poco::SystemException("cannot get local time");
#endif
adjustForTzd();
_tzd = (Timezone::utcOffset() + ((broken.tm_isdst == 1) ? 3600 : 0));
#endif
adjustForTzd();
}
else
{