from datetime import datetime


def to_epoch(ogtime):
    """Convert formatted time to Unix/epoch time."""
    fstr = '%Y-%m-%dT%H:%M:%S.%fZ'
    epoch = datetime(1970, 1, 1)
    finaltime = (datetime.strptime(ogtime, fstr) - epoch).total_seconds()

    return finaltime