mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 06:17:15 +01:00
trunk/branch integration: VxWorks & Wince
This commit is contained in:
parent
e729c102b0
commit
5cdea0c145
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user