time_t temp; struct tm *tms; hContact=find_contact(nick); if (hContact==NULL) { SkypeSend("GET USER %s BUDDYSTATUS", nick); } else { if (atoi(ptr+9) != 0){ temp = time(0); tms = localtime(&temp); if (atoi(ptr+9) >= 86400 ) timezone=256-((2*(atoi(ptr+9)-86400))/3600); if (atoi(ptr+9) < 86400 ) timezone=((-2*(atoi(ptr+9)-86400))/3600); if (tms->tm_isdst == 1 && DBGetContactSettingByte(NULL, pszSkypeProtoName, "UseTimeZonePatch", 0)) { DBWriteContactSettingByte(hContact, "UserInfo", "Timezone", (timezone+2)); } else { DBWriteContactSettingByte(hContact, "UserInfo", "Timezone", (timezone+0)); } } else { DBDeleteContactSetting(hContact, "UserInfo", "Timezone"); } free(buf); break;