Przeglądaj źródła

默认23到4点.

git-svn-id: https://202.107.226.68:8443/svn/Services/ResistanceMonitor@72 a05970a1-87b9-9d4f-9ee5-fa77e2ec115b
shenchunzhong 1 rok temu
rodzic
commit
202f05e2c4
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      4.Data/SkylightMng.cpp

+ 4 - 4
4.Data/SkylightMng.cpp

@@ -17,12 +17,12 @@ BOOL CSkylightMng::IsSkylight(SYSTEMTIME* pstTime)
 	{
 		SYSTEMTIME st;
 		GetLocalTime(&st);
-		if (st.wHour <= 4 && st.wHour >= 0)
+		if (st.wHour < 4 || st.wHour >= 23)
 			return TRUE;
 	}
 	else
 	{
-		if (pstTime->wHour <= 4 && pstTime->wHour >= 0)
+		if (pstTime->wHour < 4 || pstTime->wHour >= 23)
 			return TRUE;
 	}
 
@@ -33,7 +33,7 @@ BOOL CSkylightMng::IsSkylight(COleDateTime* pdtTime)
 {
 	if (pdtTime)
 	{
-		if (pdtTime->GetHour() <= 4 && pdtTime->GetHour() >= 0)
+		if (pdtTime->GetHour() < 4 || pdtTime->GetHour() >= 23)
 			return TRUE;
 	}
 
@@ -44,7 +44,7 @@ BOOL CSkylightMng::IsSkylight(CTime* ptmTime)
 {
 	if (ptmTime)
 	{
-		if (ptmTime->GetHour() <= 4 && ptmTime->GetHour() >= 0)
+		if (ptmTime->GetHour() < 4 || ptmTime->GetHour() >= 23)
 			return TRUE;
 	}