bool Timezone::isDst(const Timestamp& timestamp) { std::time_t time = timestamp.epochTime(); struct std::tm* tms = std::localtime(&time); if (!tms) throw Poco::SystemException("cannot get local time DST flag"); return tms->tm_isdst > 0; }
void SSLContext::flushSessionCache() { assert(_usage == SERVER_USE); Timestamp now; SSL_CTX_flush_sessions(_sslContext, static_cast<long>(now.epochTime())); }
void FileImpl::setLastModifiedImpl(const Timestamp& ts) { poco_assert (!_path.empty()); struct utimbuf tb; tb.actime = ts.epochTime(); tb.modtime = ts.epochTime(); if (utime(const_cast<char*>(_path.c_str()), &tb) != 0) handleLastErrorImpl(_path); }
bool Timezone::isDst(const Timestamp& timestamp) { std::time_t time = timestamp.epochTime(); #if _WIN32_WCE >= 0x800 struct std::tm* tms = localtime(&time); #else struct std::tm* tms = wceex_localtime(&time); #endif if (!tms) throw SystemException("cannot get local time DST flag"); return tms->tm_isdst > 0; }
bool Timezone::isDst(const Timestamp& timestamp) { std::time_t time = timestamp.epochTime(); struct std::tm* tms = std::localtime(&time); return tms->tm_isdst > 0; }