diff options
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r-- | plugins/NewsAggregator/Src/CheckFeed.cpp | 16 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 2 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Update.cpp | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index 448cf8d1da..559b52d3d9 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -176,7 +176,7 @@ static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStr if (!MesExist) {
if (stamp == 0)
- stamp = time(nullptr);
+ stamp = time(0);
T2Utf pszMessage(message);
@@ -392,10 +392,10 @@ void CheckCurrentFeed(MCONTACT hContact) szChildText = xmlGetText(child);
if (szChildText) {
time_t stamp = DateToUnixTime(szChildText, 0);
- double deltaupd = difftime(time(nullptr), stamp);
- double deltacheck = difftime(time(nullptr), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
+ double deltaupd = difftime(time(0), stamp);
+ double deltacheck = difftime(time(0), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
if (deltaupd - deltacheck >= 0) {
- db_set_dw(hContact, MODULE, "LastCheck", (DWORD)time(nullptr));
+ db_set_dw(hContact, MODULE, "LastCheck", (DWORD)time(0));
xmlDestroyNode(hXml);
return;
}
@@ -525,10 +525,10 @@ void CheckCurrentFeed(MCONTACT hContact) if (szChildText) {
wchar_t *lastupdtime = (wchar_t *)szChildText;
time_t stamp = DateToUnixTime(lastupdtime, 1);
- double deltaupd = difftime(time(nullptr), stamp);
- double deltacheck = difftime(time(nullptr), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
+ double deltaupd = difftime(time(0), stamp);
+ double deltacheck = difftime(time(0), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
if (deltaupd - deltacheck >= 0) {
- db_set_dw(hContact, MODULE, "LastCheck", (DWORD)time(nullptr));
+ db_set_dw(hContact, MODULE, "LastCheck", (DWORD)time(0));
xmlDestroyNode(hXml);
return;
}
@@ -601,7 +601,7 @@ void CheckCurrentFeed(MCONTACT hContact) xmlDestroyNode(hXml);
}
}
- db_set_dw(hContact, MODULE, "LastCheck", (DWORD)time(nullptr));
+ db_set_dw(hContact, MODULE, "LastCheck", (DWORD)time(0));
}
void CheckCurrentFeedAvatar(MCONTACT hContact)
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index bf9030bb6f..0cc91bec3e 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -38,7 +38,7 @@ int NewsAggrInit(WPARAM, LPARAM) for (auto &hContact : Contacts(MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
- db_set_dw(hContact, MODULE, "LastCheck", time(nullptr));
+ db_set_dw(hContact, MODULE, "LastCheck", time(0));
db_set_w(hContact, MODULE, "Status", ID_STATUS_ONLINE);
}
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp index 893a00239b..45db5d3f7e 100644 --- a/plugins/NewsAggregator/Src/Update.cpp +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -32,7 +32,7 @@ void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD) bool HaveUpdates = FALSE;
for (auto &hContact : Contacts(MODULE)) {
if (db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME)) {
- double diff = difftime(time(nullptr), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
+ double diff = difftime(time(0), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) {
UpdateListAdd(hContact);
HaveUpdates = TRUE;
|