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