summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-10-21 20:02:42 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-10-21 20:02:42 +0000
commitb5bea6ef18bd33fbb424ae9f909c119496463d02 (patch)
tree2bd6668b99c322ad5b0892e91df9847b4662f9ce /protocols
parent9620406c74af23fc9c2c0a6cb7bac08195997112 (diff)
fixed birthdate
git-svn-id: http://svn.miranda-ng.org/main/trunk@2037 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Skype/src/skype_contacts.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp
index 4bbd143566..6e29158e95 100644
--- a/protocols/Skype/src/skype_contacts.cpp
+++ b/protocols/Skype/src/skype_contacts.cpp
@@ -70,15 +70,15 @@ void CSkypeProto::UpdateContactBirthday(HANDLE hContact, CContact::Ref contact)
{
uint data;
contact->GetPropBirthday(data);
- if (data > 0)
+ TCHAR date[9];
+ _itot_s(data, date, 10);
+ if (date > 0)
{
- struct tm* ptm;
- time_t timeGMT = (time_t)data;
- ptm = gmtime(&timeGMT);
- this->SetSettingByte(hContact, "BirthDay", ptm->tm_mday);
- this->SetSettingByte(hContact, "BirthMonth", ptm->tm_mon);
- // todo: fix stupid year constant
- this->SetSettingWord(hContact, "BirthYear", ptm->tm_year + 1917);
+ INT day, month, year;
+ _stscanf(date, _T("%04d%02d%02d"), &year, &month, &day);
+ this->SetSettingByte(hContact, "BirthDay", day);
+ this->SetSettingByte(hContact, "BirthMonth", month);
+ this->SetSettingWord(hContact, "BirthYear", year);
}
else
{