public static function formatStrTime($time, $withSeconds = true)
    {
        // Pad left with 0 in case we get numbers like 123, 12, 122015
        $time = str_pad($time.'', 6, '0', STR_PAD_LEFT);

        $_time = array();

        $_time[] = substr($time, 0, 2);
        $_time[] = substr($time, 2, 2);

        if ($withSeconds) {
            $_seconds = substr($time, 4, 2);
            $_time[] = $_seconds;
        }

        return implode(':', $_time);
    }