summaryrefslogtreecommitdiff
path: root/plugins/IEView/src/ScriverHTMLBuilder.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 18:18:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 18:18:13 +0000
commitbf37d6655a27cc3ea5af5412c9717596c9d1c30f (patch)
tree9a537b8cd5cd85b27b5a296f77a972a0ae0c3863 /plugins/IEView/src/ScriverHTMLBuilder.cpp
parentd55f17dea8734cfb458fd8fcbac684d141b181af (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/IEView/src/ScriverHTMLBuilder.cpp')
-rw-r--r--plugins/IEView/src/ScriverHTMLBuilder.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp
index 7e98f6a877..7143720889 100644
--- a/plugins/IEView/src/ScriverHTMLBuilder.cpp
+++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp
@@ -120,19 +120,11 @@ void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
}
}
-char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mode)
+char* ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mode)
{
- static char szResult[512];
+ static char szResult[512]; szResult[0] = '\0';
char str[80];
- char format[20];
- DBTIMETOSTRING dbtts;
-
- szResult[0] = '\0';
- format[0] = '\0';
-
- dbtts.cbDest = 70;
- dbtts.szDest = str;
- dbtts.szFormat = format;
+ char format[20]; format[0] = '\0';
if ((mode == 0 || mode == 1) && (dwFlags & SMF_LOG_SHOWDATE)) {
struct tm tm_now, tm_today;
@@ -163,13 +155,13 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod
}
}
if (mode == 0 || mode == 2) {
- if (mode == 0 && (dwFlags & SMF_LOG_SHOWDATE)) {
+ if (mode == 0 && (dwFlags & SMF_LOG_SHOWDATE))
mir_strcat(format, " ");
- }
+
mir_strcat(format, (dwFlags & SMF_LOG_SHOWSECONDS) ? "s" : "t");
}
if (format[0] != '\0') {
- CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM)& dbtts);
+ TimeZone_ToString(check, format, str, SIZEOF(str));
mir_strncat(szResult, str, SIZEOF(szResult) - mir_strlen(szResult));
}
mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500);