from datetime import datetime


def ptime_to_epoch(ptime=datetime(1970,1,1)):
    """Transfer from python datetime to epoch time format."""
    return int((ptime - datetime(1970,1,1)).total_seconds())