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/IEView/src/TabSRMMHTMLBuilder.cpp | |
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/IEView/src/TabSRMMHTMLBuilder.cpp')
-rw-r--r-- | plugins/IEView/src/TabSRMMHTMLBuilder.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp index aa08a7b73a..5f02f33da0 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp @@ -155,18 +155,14 @@ char* TabSRMMHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int isG {
static char szResult[512];
char str[80];
-
- DBTIMETOSTRING dbtts;
+ const char *szFormat;
struct tm tm_now, tm_today;
time_t now = time(NULL);
time_t today;
- dbtts.cbDest = 70;
- dbtts.szDest = str;
-
if (!isGroupBreak || !(dwFlags & MWF_LOG_SHOWDATES)) {
- dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"s" : (char *)"t";
+ szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? "s" : "t";
szResult[0] = '\0';
}
else {
@@ -176,24 +172,24 @@ char* TabSRMMHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int isG today = mktime(&tm_today);
if (dwFlags & MWF_LOG_USERELATIVEDATES && check >= today) {
- dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"s" : (char *)"t";
+ szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? "s" : "t";
mir_strcpy(szResult, Translate("Today"));
mir_strcat(szResult, ", ");
}
else if (dwFlags & MWF_LOG_USERELATIVEDATES && check > (today - 86400)) {
- dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"s" : (char *)"t";
+ szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? "s" : "t";
mir_strcpy(szResult, Translate("Yesterday"));
mir_strcat(szResult, ", ");
}
else {
if (dwFlags & MWF_LOG_LONGDATES)
- dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"D s" : (char *)"D t";
+ szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? "D s" : "D t";
else
- dbtts.szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? (char *)"d s" : (char *)"d t";
+ szFormat = (dwFlags & MWF_LOG_SHOWSECONDS) ? "d s" : "d t";
szResult[0] = '\0';
}
}
- CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM)& dbtts);
+ TimeZone_ToString(check, szFormat, str, SIZEOF(str));
mir_strncat(szResult, str, SIZEOF(szResult) - mir_strlen(szResult));
mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500);
return szResult;
|