def to_timestamp(datetime_value):
 return int((datetime_value - datetime(1970, 1, 1, tzinfo=utc)).total_seconds())

def to_timestamp ( datetime_value ) : return int ( ( datetime_value - datetime ( 1970 , 1 , 1 , tzinfo = utc ) ) . total_seconds ( ) )
convert a datetime into a timestamp .