Skip to content

Commit 83eadc8

Browse files
committed
feat: ueditor upgrade
1 parent 4aea2e8 commit 83eadc8

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

module/Blog/Util/BlogThemeUtil.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
namespace Module\Blog\Util;
55

66

7+
use ModStart\Core\Util\TimeUtil;
8+
79
class BlogThemeUtil
810
{
911
public static function isDark()
@@ -17,13 +19,14 @@ public static function isDark()
1719
return false;
1820
}
1921
$time = date('H:i:s');
20-
if ($end < $start) {
21-
$t = $start;
22-
$start = $end;
23-
$end = $t;
24-
}
25-
if ($time > $start && $time < $end) {
26-
return true;
22+
if ($end > $start) {
23+
if ($time > $start && $time < $end) {
24+
return true;
25+
}
26+
} else {
27+
if ($time < $end || $time > $start) {
28+
return true;
29+
}
2730
}
2831
return false;
2932
}

0 commit comments

Comments
 (0)