trunk: backport eventing from 1.4.3

This commit is contained in:
Marian Krivos
2012-02-05 12:16:58 +00:00
parent 59fe68edbe
commit 7d7c02c579
412 changed files with 3564 additions and 3634 deletions

View File

@@ -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
{