Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
void SSLContext::flushSessionCache() 
{
    assert(_usage == SERVER_USE);

    Timestamp now;
    SSL_CTX_flush_sessions(_sslContext, static_cast<long>(now.epochTime()));
}
Ejemplo n.º 3
0
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);
}
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
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;
}