def normalize_timestamp(timestamp):
    """ Normalize timestamp to seconces since epoch
    """
    if (str(timestamp).find('E12') >= 0 or
            len(str(int(float(timestamp)))) == 13):
        timestamp = int(float(timestamp) / 1000.0)
    else:
        timestamp = int(float(timestamp))
    return timestamp