def get_remote_json_timestamp_epoch(username):
    user_infoRemote = None
    monitoredUserSelected = manageMonitoredUsersDB.get_monitoredUserByName(username)
    temp = monitoredUserSelected[2]
    temp = temp.replace("'", '"')
    temp = temp.replace('True', 'true')
    temp = temp.replace('False', 'false')
    temp = json.loads(temp)
    for key in temp.keys():
        if (key == 'user_info'):
            user_infoRemote = temp[key]
    if (user_infoRemote != None):
        json_timestamp_epochRemote = user_infoRemote['json_timestamp_epoch']
        return float(json_timestamp_epochRemote)
    else:
        print((((('\n' + '\x1b[91m') + 'ERROR: No se ha podido obtener user_info en remoto, monitoredUser.db') + '\x1b[0m') + '\n'))
        with open((os.getcwd() + '/logs/fail_to_get_remote_epoch'), 'a') as fileText:
            fileText.write((((('The username fail to read is ' + username) + ' at ') + str(datetime.datetime.now())) + '\n'))
        fileText.close()
def get_remote_json_timestamp_epoch(username):
    user_infoRemote = None
    monitoredUserSelected = manageMonitoredUsersDB.get_monitoredUserByName(username)
    temp = monitoredUserSelected[2]
    temp = temp.replace("'", '"')
    temp = temp.replace('True', 'true')
    temp = temp.replace('False', 'false')
    temp = json.loads(temp)
    for key in temp.keys():
        if (key == 'user_info'):
            user_infoRemote = temp[key]
    if (user_infoRemote != None):
        json_timestamp_epochRemote = user_infoRemote['json_timestamp_epoch']
        return float(json_timestamp_epochRemote)
    else:
        print((((('\n' + '\x1b[91m') + 'ERROR: No se ha podido obtener user_info en remoto, monitoredUser.db') + '\x1b[0m') + '\n'))
        with open((os.getcwd() + '/logs/fail_to_get_remote_epoch'), 'a') as fileText:
            fileText.write((((('The username fail to read is ' + username) + ' at ') + str(datetime.datetime.now())) + '\n'))
        fileText.close()