| 1 | <?php |
||
| 7 | class Boottime implements RuntimeInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Reads the wmic command which returns the last bootup time and converts it to a unix timestamp |
||
| 11 | * |
||
| 12 | * @param string $command wmic command |
||
| 13 | * @return int |
||
| 14 | */ |
||
| 15 | public function read($command = 'wmic os get lastbootuptime') |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Takes the output of wmic os get lastbootuptime and converts the offset given in minutes to an HHMM offset acceptable by PHP createFromFormat 'O' |
||
| 28 | * |
||
| 29 | * @param string $wmicString string output given by wmic command |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | private function convertWmicOffset($wmicString) |
||
| 39 | } |
||
| 40 |