Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | protected function createCurrentTimeObject() |
||
40 | { |
||
41 | $dateTime = \DateTime::createFromFormat('U.u', (string) microtime(true)); |
||
42 | if (!($dateTime instanceof \DateTime)) { |
||
43 | throw new \WebServCo\Framework\Exceptions\ApplicationException( |
||
44 | 'Error initializing DateTime object' |
||
45 | ); |
||
46 | } |
||
47 | $dateTime->setTimezone(new \DateTimeZone($this->timeZone)); |
||
48 | return $dateTime; |
||
49 | } |
||
51 |