diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-24 19:02:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-24 19:02:33 +0000 |
commit | 1292231ff3df5048f7e2e1da1b5b41af1ad076d6 (patch) | |
tree | 47845f3c4b9f986ff486a45ff105eda963bac23d /protocols/JabberG/src/jabber_util.cpp | |
parent | b3efd156b2ded1777ee2b4522acba1fa2d666ca7 (diff) |
- fixes bug #1250 (Mess with timestamps in JABBER archive (XEP-0136));
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16870 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 0fe957a179..df084380c7 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -758,7 +758,7 @@ void CJabberProto::RebuildInfoFrame() TCHAR* time2str(time_t _time, TCHAR *buf, size_t bufLen)
{
- struct tm* T = localtime(&_time);
+ struct tm* T = gmtime(&_time);
mir_sntprintf(buf, bufLen, _T("%04d-%02d-%02dT%02d:%02d:%02dZ"),
T->tm_year + 1900, T->tm_mon + 1, T->tm_mday, T->tm_hour, T->tm_min, T->tm_sec);
return buf;
@@ -775,7 +775,7 @@ time_t str2time(const TCHAR *buf) T.tm_year -= 1900;
T.tm_mon--;
- return mktime(&T);
+ return _mkgmtime(&T);
}
////////////////////////////////////////////////////////////////////////
|