refac: API 캐시 컨트롤에서 max-age, public 지정 가능하도록
This commit is contained in:
1 parent
095a23df6d
commit
ef532f0779
3 files changed
+15
-2
No files matched your search
@@ -181,6 +181,16 @@ class TimeUtil
|
||||
return $seconds;
|
||||
}
|
||||
|
||||
public static function nowDateTime(): \DateTime{
|
||||
$now = time();
|
||||
return static::secondsToDateTime($now, false, true);
|
||||
}
|
||||
|
||||
public static function nowDateTimeImmutable(): \DateTimeImmutable{
|
||||
$now = time();
|
||||
return static::secondsToDateTime($now, true, true);
|
||||
}
|
||||
|
||||
public static function format(\DateTimeInterface $dateTime, bool $withFraction): string{
|
||||
if (!$withFraction) {
|
||||
return $dateTime->format('Y-m-d H:i:s');
|
||||
|
||||
Reference in new issue
Block a user