void CWSESPControlEx::setSessionTimeout(int timeoutMinutes, IPropertyTree& session)
{
    CDateTime timeNow;
    timeNow.setNow();
    time_t simple = timeNow.getSimple() + timeoutMinutes*60;
    session.setPropInt64(PropSessionTimeoutAt, simple);
    session.setPropBool(PropSessionTimeoutByAdmin, true);
}
Exemplo n.º 2
0
int CDateTime::compare(CDateTime const & cdt, bool compareNanosec) const
{
    time_t thisSimple = getSimple();
    time_t thatSimple = cdt.getSimple();
    if(thisSimple != thatSimple) return ((thisSimple > thatSimple) ? +1 : -1);
    if(compareNanosec && (nanosec != cdt.nanosec)) return ((nanosec > cdt.nanosec) ? +1 : -1);
    return 0;
}
Exemplo n.º 3
0
 CXslIncludeSignature(const char* path)
 {
     if(!path || !*path)
         throw MakeStringException(-1, "CXslIncludeSignature : path can't be emtpy");
     filePath.append(path);
     Owned<IFile> f = createIFile(path);
     if(f)
     {
         CDateTime modtime;
         f->getTime(NULL, &modtime, NULL);
         fileTime = modtime.getSimple();
         fileSize = f->size();
     }
     else
     {
         fileSize = 0;
         fileTime = 0;
     }
 }
Exemplo n.º 4
0
bool CDateTime::equals(CDateTime const & cdt, bool compareNanosec) const
{
    time_t thisSimple = getSimple();
    time_t thatSimple = cdt.getSimple();
    return ((thisSimple == thatSimple) && ((compareNanosec) ? (nanosec == cdt.nanosec) : true));
}