back-end/threats_monitoring/botscout.py
def validate_time(data_array):
    """ This function validates time goodies and returns them
        @parameter
            data_array  (list)  a list of sub-lists. Each sublist contains bot entries
        @returns
            data_array  (list)  a list of sub-lists. Each sublist contains VALIDATED bot entries
    """

    for row in data_array:
        date_string = row[3]

        datetime_obj = datetime.strptime(date_string, '%Y-%m-%d %I:%M %p')
        datetime_utc = fix_hour_utc(datetime_obj, +5)
        timestamp_utc = float(datetime_utc.timestamp())
        datetime_utc_string = str(datetime_utc)

        datetime_utc_cti_string = str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S'))
        datetime_utc_cti = datetime.strptime(datetime_utc_cti_string, '%Y-%m-%d %H:%M:%S')
        timestamp_utc_cti = float(datetime_utc_cti.timestamp())

        row.append(timestamp_utc)
        row.append(datetime_utc)
        row.append(datetime_utc_string)

        row.append(timestamp_utc_cti)
        row.append(datetime_utc_cti)
        row.append(datetime_utc_cti_string)

    return data_array
 This function validates time goodies and returns them
        @parameter
            data_array  (list)  a list of sub-lists. Each sublist contains bot entries
        @returns
            data_array  (list)  a list of sub-lists. Each sublist contains VALIDATED bot entries
    
This function validates time goodies and returns them
@parameter
data_array  (list)  a list of sub-lists. Each sublist contains bot entries
@returns
data_array  (list)  a list of sub-lists. Each sublist contains VALIDATED bot entries
This function validates time goodies and returns them @parameter data_array ( list ) a list of sub - lists . Each sublist contains bot entries @returns data_array ( list ) a list of sub - lists . Each sublist contains VALIDATED bot entries
def validate_time(data_array):
    for row in data_array:
        date_string = row[3]
        datetime_obj = datetime.strptime(date_string, '%Y-%m-%d %I:%M %p')
        datetime_utc = fix_hour_utc(datetime_obj, +5)
        timestamp_utc = float(datetime_utc.timestamp())
        datetime_utc_string = str(datetime_utc)
        datetime_utc_cti_string = str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S'))
        datetime_utc_cti = datetime.strptime(datetime_utc_cti_string, '%Y-%m-%d %H:%M:%S')
        timestamp_utc_cti = float(datetime_utc_cti.timestamp())
        row.append(timestamp_utc)
        row.append(datetime_utc)
        row.append(datetime_utc_string)
        row.append(timestamp_utc_cti)
        row.append(datetime_utc_cti)
        row.append(datetime_utc_cti_string)
    return data_array
def validate_time ( data_array ) : for row in data_array : date_string = row [ 3 ] datetime_obj = datetime . strptime ( date_string , '%Y-%m-%d %I:%M %p' ) datetime_utc = fix_hour_utc ( datetime_obj , + 5 ) timestamp_utc = float ( datetime_utc . timestamp ( ) ) datetime_utc_string = str ( datetime_utc ) datetime_utc_cti_string = str ( datetime . utcnow ( ) . strftime ( '%Y-%m-%d %H:%M:%S' ) ) datetime_utc_cti = datetime . strptime ( datetime_utc_cti_string , '%Y-%m-%d %H:%M:%S' ) timestamp_utc_cti = float ( datetime_utc_cti . timestamp ( ) ) row . append ( timestamp_utc ) row . append ( datetime_utc ) row . append ( datetime_utc_string ) row . append ( timestamp_utc_cti ) row . append ( datetime_utc_cti ) row . append ( datetime_utc_cti_string ) return data_array
This function validates time goodies and returns them
@parameter
data_array  (list)  a list of sub-lists.
This function validates time goodies and returns them @parameter data_array ( list ) a list of sub - lists .
""" This function validates time goodies and returns them
        @parameter
            data_array  (list)  a list of sub-lists. Each sublist contains bot entries
        @returns
            data_array  (list)  a list of sub-lists. Each sublist contains VALIDATED bot entries
    """
data_array