1
1
This commit is contained in:
Binary file not shown.
@@ -11,12 +11,12 @@ def run_adb_command(command_list):
|
||||
|
||||
def get_now_time(device):
|
||||
# adb shell date +%s
|
||||
output, status_code, error = run_adb_command(['adb', '-s', device, 'shell', 'date', '+%s'])
|
||||
output, status_code, error = run_adb_command(['adb', '-s', device, 'shell', 'date',"'+%Y-%m-%d %H:%M:%S'"])
|
||||
if status_code == 0:
|
||||
print(f"get_now_time output: {output}")
|
||||
logging.info(f"get now time output: {output}")
|
||||
now_timestamp = int(output)
|
||||
return now_timestamp
|
||||
now_time = output
|
||||
return now_time
|
||||
else:
|
||||
print(error)
|
||||
logging.error(f"get now time error: {error}")
|
||||
@@ -100,4 +100,5 @@ def restart_ProxyMe(device):
|
||||
return False
|
||||
else:
|
||||
print(f"stop autojs failed")
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
@@ -16,3 +16,9 @@ def read_config_ini():
|
||||
# return cache_file_path,database_config
|
||||
return cache_file_path
|
||||
|
||||
def read_time_difference():
|
||||
file_path = './config.ini'
|
||||
config = configparser.ConfigParser()
|
||||
config.read(file_path)
|
||||
time_difference = config.get("General","time_difference")
|
||||
return time_difference
|
||||
Reference in New Issue
Block a user