File: Clock.php Lines 49 to 68 |
|
49 | $timeZone = new \DateTimeZone(date_default_timezone_get()); |
|
50 | $result = $result->setTimeZone($timeZone); |
|
51 | return $result; |
|
52 | } |
|
53 | |
|
54 | /** |
|
55 | * scriptの開始時刻を返す |
|
56 | * @return int |
|
57 | */ |
| | public function getRequestTimeAsInt() { |
|
59 | return $_SERVER['REQUEST_TIME']; |
|
60 | } |
|
61 | |
|
62 | /** |
|
63 | * scriptの開始時刻を返す |
|
64 | * @return \DateTimeImmutable |
|
65 | * @throws \Exception |
|
66 | */ |
|
67 | public function getRequestTimeAsImmutable() { |
|
68 | $intUnixTime = $this->getRequestTimeAsInt(); |
|