diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 18:18:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 18:18:13 +0000 |
commit | bf37d6655a27cc3ea5af5412c9717596c9d1c30f (patch) | |
tree | 9a537b8cd5cd85b27b5a296f77a972a0ae0c3863 /plugins/SeenPlugin/src | |
parent | d55f17dea8734cfb458fd8fcbac684d141b181af (diff) |
timezone api migrated to mir_core
git-svn-id: http://svn.miranda-ng.org/main/trunk@14266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin/src')
-rw-r--r-- | plugins/SeenPlugin/src/seen.h | 1 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/SeenPlugin/src/seen.h b/plugins/SeenPlugin/src/seen.h index 6f2273546b..4a83833fe6 100644 --- a/plugins/SeenPlugin/src/seen.h +++ b/plugins/SeenPlugin/src/seen.h @@ -41,6 +41,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_message.h>
#include <m_protosvc.h>
#include <m_popup.h>
+#include <m_timezones.h>
#include <m_ignore.h>
#include <m_button.h>
#include <m_string.h>
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index ea0df3cb61..6a1818d295 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -105,7 +105,7 @@ DWORD isSeen(MCONTACT hcontact, SYSTEMTIME *st) DWORD res = db_get_dw(hcontact, S_MOD, "seenTS", 0);
if (res) {
if (st) {
- ll = UInt32x32To64(CallService(MS_DB_TIME_TIMESTAMPTOLOCAL, res, 0), 10000000) + NUM100NANOSEC;
+ ll = UInt32x32To64(TimeZone_ToLocal(res), 10000000) + NUM100NANOSEC;
ft.dwLowDateTime = (DWORD)ll;
ft.dwHighDateTime = (DWORD)(ll >> 32);
FileTimeToSystemTime(&ft, st);
@@ -127,7 +127,7 @@ DWORD isSeen(MCONTACT hcontact, SYSTEMTIME *st) ll -= NUM100NANOSEC;
ll /= 10000000;
//perform LOCALTOTIMESTAMP
- res = (DWORD)ll - CallService(MS_DB_TIME_TIMESTAMPTOLOCAL, 0, 0);
+ res = (DWORD)ll - TimeZone_ToLocal(0);
//nevel look for Year/Month/Day/Hour/Minute/Second again
db_set_dw(hcontact, S_MOD, "seenTS", res);
}
@@ -406,7 +406,7 @@ void DBWriteTimeTS(DWORD t, MCONTACT hcontact) {
SYSTEMTIME st;
FILETIME ft;
- ULONGLONG ll = UInt32x32To64(CallService(MS_DB_TIME_TIMESTAMPTOLOCAL, t, 0), 10000000) + NUM100NANOSEC;
+ ULONGLONG ll = UInt32x32To64(TimeZone_ToLocal(t), 10000000) + NUM100NANOSEC;
ft.dwLowDateTime = (DWORD)ll;
ft.dwHighDateTime = (DWORD)(ll >> 32);
FileTimeToSystemTime(&ft, &st);
|