#include "stdafx.h" #include "SkylightMng.h" CSkylightMng::CSkylightMng() { } CSkylightMng::~CSkylightMng() { } BOOL CSkylightMng::IsSkylight(SYSTEMTIME* pstTime) { if (pstTime == NULL) { SYSTEMTIME st; GetLocalTime(&st); if (st.wHour < 4 || st.wHour >= 23) return TRUE; } else { if (pstTime->wHour < 4 || pstTime->wHour >= 23) return TRUE; } return FALSE; } BOOL CSkylightMng::IsSkylight(COleDateTime* pdtTime) { if (pdtTime) { if (pdtTime->GetHour() < 4 || pdtTime->GetHour() >= 23) return TRUE; } return FALSE; } BOOL CSkylightMng::IsSkylight(CTime* ptmTime) { if (ptmTime) { if (ptmTime->GetHour() < 4 || ptmTime->GetHour()>=23) return TRUE; } return FALSE; } CSkylightMng CSkylightMng::m_pInstance;