Example #1
0
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;
}
Example #4
0
MTime::MTime(DWORD dwStamp)
{
	ZeroDate();
	FromStampAsUTC(dwStamp);
}
Example #5
0
MTime::MTime(LARGE_INTEGER &li, bool bIsLocal)
{
	ZeroDate();
	Set(li, bIsLocal);
}
Example #6
0
MTime::MTime(FILETIME &ft, bool bIsLocal)
{
	ZeroDate();
	Set(ft, bIsLocal);
}
Example #7
0
MTime::MTime() 
{
	ZeroDate();
}
Example #8
0
MTime::MTime(LARGE_INTEGER &li, const BYTE bIsLocal)
{
	ZeroDate();
	Set(li, bIsLocal);
}
Example #9
0
MTime::MTime(FILETIME &ft, const BYTE bIsLocal)
{
	ZeroDate();
	Set(ft, bIsLocal);
}