<?php

namespace Uptime\Runtime\Windows;

use Uptime\Runtime\RuntimeInterface;

class Boottime implements RuntimeInterface
{

    public function read($command = 'wmic os get lastbootuptime')
    {
        return trim( explode( "\n", shell_exec($command) )[1] );
    }
}

<?php

namespace Uptime\Runtime\Windows;

use Uptime\Runtime\RuntimeInterface;

class Boottime implements RuntimeInterface
{

    public function read($command = 'wmic os get lastbootuptime')
    {
        $dateTime = \DateTime::createFromFormat(
            'YmdHis.uO',
            trim( explode( "\n", shell_exec($command) )[1] )
        );
        return $dateTime->getTimestamp();
    }
}

Fix for windows boottime to convert returned string format to a timestamp
Fix for windows boottime to convert returned string format to a timestamp
