int MTime::DBGetStamp (MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) { if (hContact == INVALID_CONTACT_ID || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0) { ZeroDate(); return 1; } DWORD dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0); if (dwTimeStamp == 0) { ZeroDate(); return 1; } FromStampAsUTC(dwTimeStamp); _isLocal = FALSE; return 0; }
/** * name: Set * class: MAnnivDate * desc: set new date * param: none * return: nothing **/ VOID MAnnivDate::SetDate(SYSTEMTIME &st) { ZeroDate(); Year(st.wYear); Month(st.wMonth); Day(st.wDay); }
/** * name: Clear * class: MAnnivDate * desc: set all attributes to default value * param: none * return: nothing **/ VOID MAnnivDate::Clear() { ZeroDate(); _wID = ANID_NONE; _strDesc.clear(); _strModule.clear(); _wFlags = MADF_NONE; _bRemind = BST_INDETERMINATE; _wDaysEarlier = (WORD)-1; }
MTime::MTime(DWORD dwStamp) { ZeroDate(); FromStampAsUTC(dwStamp); }
MTime::MTime(LARGE_INTEGER &li, bool bIsLocal) { ZeroDate(); Set(li, bIsLocal); }
MTime::MTime(FILETIME &ft, bool bIsLocal) { ZeroDate(); Set(ft, bIsLocal); }
MTime::MTime() { ZeroDate(); }
MTime::MTime(LARGE_INTEGER &li, const BYTE bIsLocal) { ZeroDate(); Set(li, bIsLocal); }
MTime::MTime(FILETIME &ft, const BYTE bIsLocal) { ZeroDate(); Set(ft, bIsLocal); }