summaryrefslogtreecommitdiff
path: root/plugins/TipperYM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r--plugins/TipperYM/src/subst.cpp4
-rw-r--r--plugins/TipperYM/src/tipper.cpp2
-rw-r--r--plugins/TipperYM/src/translations.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index cd69f7bf38..c2be17ac88 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -338,7 +338,7 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int
else if ((recv = !mir_wstrcmp(swzRawSpec, L"last_msg_reltime")) || !mir_wstrcmp(swzRawSpec, L"last_msg_out_reltime")) {
DWORD ts = LastMessageTimestamp(hContact, recv);
if (ts == 0) return false;
- DWORD t = (DWORD)time(nullptr);
+ DWORD t = (DWORD)time(0);
DWORD diff = (t - ts);
int d = (diff / 60 / 60 / 24);
int h = (diff - d * 60 * 60 * 24) / 60 / 60;
@@ -366,7 +366,7 @@ bool GetSysSubstText(MCONTACT hContact, wchar_t *swzRawSpec, wchar_t *buff, int
if (i > 0)
hTmpContact = db_mc_getSub(hContact, i);
dwRecountTs = db_get_dw(hTmpContact, MODULE, "LastCountTS", 0);
- dwTime = (DWORD)time(nullptr);
+ dwTime = (DWORD)time(0);
dwDiff = (dwTime - dwRecountTs);
if (dwDiff > (60 * 60 * 24 * 3)) {
db_set_dw(hTmpContact, MODULE, "LastCountTS", dwTime);
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp
index 5a8d31192f..a28b8a7798 100644
--- a/plugins/TipperYM/src/tipper.cpp
+++ b/plugins/TipperYM/src/tipper.cpp
@@ -266,7 +266,7 @@ int ModulesLoaded(WPARAM, LPARAM)
CallService(MS_CLC_SETINFOTIPHOVERTIME, opt.iTimeIn, 0);
// set Miranda start timestamp
- db_set_dw(0, MODULE, "MirandaStartTS", (DWORD)time(nullptr));
+ db_set_dw(0, MODULE, "MirandaStartTS", (DWORD)time(0));
return 0;
}
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp
index bff2e51d8b..8a487fd6a2 100644
--- a/plugins/TipperYM/src/translations.cpp
+++ b/plugins/TipperYM/src/translations.cpp
@@ -105,7 +105,7 @@ wchar_t* TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, cons
wchar_t* TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
- DWORD t = (DWORD)time(nullptr);
+ DWORD t = (DWORD)time(0);
if (ts == 0) return nullptr;
DWORD diff = (ts > t) ? 0 : (t - ts);
@@ -481,7 +481,7 @@ wchar_t *DayMonthToDaysToNextBirthday(MCONTACT hContact, const char *szModuleNam
if (!db_get(hContact, szModuleName, szSettingName, &dbv)) {
if (GetInt(dbv, &month)) {
db_free(&dbv);
- time_t now = time(nullptr);
+ time_t now = time(0);
struct tm *ti = localtime(&now);
int yday_now = ti->tm_yday;