summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-07-09 18:27:49 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-07-09 18:27:49 +0300
commit6f34ba6b1e28eb212ede9442bd426f6f0bcc0acb (patch)
tree3808462f366fc17d7517fa6081946d4eaf24ad29
parent363acce4a9ad970a3b04240d80d81980b18c160e (diff)
fixes #4519 (Jabber: некорректный показ времени и даты в информации о пользователе)
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 25325165d2..335a4addd7 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -349,14 +349,13 @@ class JabberUserInfoDlg : public JabberBaseUserInfoDlg
}
// logoff
- char buf[256];
JABBER_RESOURCE_STATUS *r = item->getTemp();
if (r->m_dwIdleStartTime > 0) {
- struct tm *lt = localtime(&r->m_dwIdleStartTime);
- mir_snprintf(buf, "%d.%d.%d %d:%d", lt->tm_mday, lt->tm_mon, 1900 + lt->tm_year, lt->tm_hour, lt->tm_min);
+ wchar_t wbuf[100];
+ printDateTimeByContact(item->hContact, L"d t", wbuf, _countof(wbuf), 0);
FillInfoLine(htiRoot, nullptr,
- (item->jid && strchr(item->jid, '@')) ? TranslateT("Last logoff time") : TranslateT("Uptime"), buf,
+ (item->jid && strchr(item->jid, '@')) ? TranslateT("Last logoff time") : TranslateT("Uptime"), T2Utf(wbuf),
sttInfoLineId(0, INFOLINE_LOGOFF));
}