diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-28 12:03:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-28 12:03:47 +0300 |
commit | c505cadce283c5abf15f87e3c72655c70d738e21 (patch) | |
tree | 114c31c8a5715e48af60d180b34693648962a44a /protocols/ICQ-WIM/src/utils.cpp | |
parent | 76350d50ef7043a171292d6ec7574ed863af4067 (diff) |
ICQ10:
- fixes #1800 (ICQ10: add aboutMe content to user info);
- added ICQ User Info page
- code cleaning
Diffstat (limited to 'protocols/ICQ-WIM/src/utils.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/utils.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp index 7f41347918..5f7e806e96 100644 --- a/protocols/ICQ-WIM/src/utils.cpp +++ b/protocols/ICQ-WIM/src/utils.cpp @@ -240,3 +240,20 @@ void CIcqProto::setId(MCONTACT hContact, const char *szSetting, __int64 iValue) if (oldVal != iValue) db_set_blob(hContact, m_szModuleName, szSetting, &iValue, sizeof(iValue)); } + +///////////////////////////////////////////////////////////////////////////////////////// + +char* time2text(time_t time) +{ + if (time == 0) + return ""; + + tm *local = localtime(&time); + if (local) { + char *str = asctime(local); + str[24] = '\0'; // remove new line + return str; + } + + return "<invalid>"; +} |