diff options
| author | Eltrac <45323514+BigCoke233@users.noreply.github.com> | 2019-07-25 16:07:14 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-25 16:07:14 +0800 |
| commit | 35a51540b738f47c500b47a3398416e951096e5a (patch) | |
| tree | 2885d38d5be8c07581e52afb68410eeb8481b08d /libs/Utils.php | |
| parent | 38353f67af44f1a2c0b29d9ff43f0c2a42958833 (diff) | |
左侧抽屉栏,可与顶部导航栏进行切换 / Bug fix
Diffstat (limited to 'libs/Utils.php')
| -rw-r--r-- | libs/Utils.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/Utils.php b/libs/Utils.php index 9e7943e..902b7d4 100644 --- a/libs/Utils.php +++ b/libs/Utils.php @@ -85,12 +85,17 @@ class Utils /** * 判定内容是否过时 - * $timeout:过期时间,单位为天 + * + * @return array */ - public static function isOutdated($archive, $timeout) + public static function isOutdated($archive) { date_default_timezone_set("Asia/Shanghai"); - return round((time()- $archive->created) / 3600 / 24) > $timeout; + $created = round((time()- $archive->created) / 3600 / 24); + $updated = round((time()- $archive->modified) / 3600 / 24); + return array("is" => $created > 90, + "created" => $created, + "updated" => $updated); } /** |
