mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-25 06:36:37 +01:00
trunk: backport eventing from 1.4.3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// LocalDateTime.cpp
|
||||
//
|
||||
// $Id: //poco/svn/Foundation/src/LocalDateTime.cpp#3 $
|
||||
// $Id: //poco/1.4/Foundation/src/LocalDateTime.cpp#2 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: DateTime
|
||||
@@ -289,19 +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;
|
||||
std::tm broken;
|
||||
#if defined(POCO_VXWORKS)
|
||||
if (localtime_r(&epochTime, &broken) != OK)
|
||||
throw Poco::SystemException("cannot get local time");
|
||||
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");
|
||||
if (!localtime_r(&epochTime, &broken))
|
||||
throw Poco::SystemException("cannot get local time");
|
||||
#endif
|
||||
_tzd = (Timezone::utcOffset() + ((broken.tm_isdst == 1) ? 3600 : 0));
|
||||
_tzd = (Timezone::utcOffset() + ((broken.tm_isdst == 1) ? 3600 : 0));
|
||||
#endif
|
||||
adjustForTzd();
|
||||
adjustForTzd();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user