removed: dependencies to 'tz' system structure
now we are using PT::Date from pikotools git-svn-id: svn://ttmath.org/publicrep/winix/trunk@839 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -18,23 +18,12 @@ LastItem::LastItem()
|
||||
user_id = 0;
|
||||
ip = 0;
|
||||
session_id = 0;
|
||||
memset((char*)&start, 0, sizeof(start));
|
||||
memset((char*)&end, 0, sizeof(end));
|
||||
}
|
||||
|
||||
|
||||
bool LastItem::IsLoggedOut()
|
||||
{
|
||||
if( end.tm_sec == 0 &&
|
||||
end.tm_min == 0 &&
|
||||
end.tm_hour == 0 &&
|
||||
end.tm_mday == 0 &&
|
||||
end.tm_mon == 0 &&
|
||||
end.tm_year == 0 )
|
||||
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return end.year > 1970;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +76,7 @@ LastTab::iterator i = FindNotLoggedOut(user_id, session_id);
|
||||
li.name = name;
|
||||
li.ip = ip;
|
||||
li.session_id = session_id;
|
||||
li.start = Time(std::time(0));
|
||||
li.start = std::time(0);
|
||||
|
||||
last_tab.insert(last_tab.end(), li);
|
||||
|
||||
@@ -103,7 +92,7 @@ LastTab::iterator i = FindNotLoggedOut(user_id, session_id);
|
||||
|
||||
if( i != last_tab.end() )
|
||||
{
|
||||
i->end = Time(std::time(0));
|
||||
i->end = std::time(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user