diff options
Diffstat (limited to 'protocols/ICQ-WIM/src/utils.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/utils.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp index 58d57778a3..4d6a975cd3 100644 --- a/protocols/ICQ-WIM/src/utils.cpp +++ b/protocols/ICQ-WIM/src/utils.cpp @@ -326,20 +326,14 @@ void CIcqProto::setId(MCONTACT hContact, const char *szSetting, __int64 iValue) ///////////////////////////////////////////////////////////////////////////////////////// -char* time2text(time_t time) +wchar_t* time2text(time_t ts) { - if (time == 0) - return ""; - - tm *local = localtime(&time); - if (local) { - if (char *str = asctime(local)) { - str[24] = '\0'; // remove new line - return str; - } - } + if (ts == 0) + return L""; - return "<invalid>"; + static wchar_t buf[100]; + TimeZone_PrintTimeStamp(NULL, ts, L"D t", buf, _countof(buf), 0); + return buf; } ///////////////////////////////////////////////////////////////////////////////////////// |