cập nhật tính năng quản trị phòng ban
This commit is contained in:
@@ -56,13 +56,13 @@ class common extends \yii\db\ActiveRecord {
|
||||
}
|
||||
|
||||
public function formatTime($time, $format = "d/m/Y") {
|
||||
// $now = time();
|
||||
// $range = $now - $time;
|
||||
// if ($range > 60 * 60 * 12) {
|
||||
$now = time();
|
||||
$range = $now - $time;
|
||||
if ($range > 60 * 60 * 12) {
|
||||
return date($format, $time);
|
||||
// } else {
|
||||
// return Yii::$app->formatter->asRelativeTime($time);
|
||||
// }
|
||||
} else {
|
||||
return Yii::$app->formatter->asRelativeTime($time);
|
||||
}
|
||||
}
|
||||
|
||||
//Upload
|
||||
|
||||
Reference in New Issue
Block a user