summaryrefslogtreecommitdiffstats
path: root/libs/Utils.php
diff options
context:
space:
mode:
Diffstat (limited to 'libs/Utils.php')
-rw-r--r--libs/Utils.php11
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);
}
/**