def to_epoch(t):
if isinstance(t, str):<EOL><INDENT>if '<STR_LIT:+>' not in t:<EOL><INDENT>t = t + '<STR_LIT>'<EOL><DEDENT>t = parser.parse(t)<EOL><DEDENT>elif t.tzinfo is None or t.tzinfo.utcoffset(t) is None:<EOL><INDENT>t = t.replace(tzinfo=pytz.timezone('<STR_LIT>'))<EOL><DEDENT>t0 = datetime.datetime(<NUM_LIT>, <NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, pytz.timezone('<STR_LIT>'))<EOL>delta = t - t0<EOL>return int(delta.total_seconds())<EOL>
Take a datetime, either as a string or a datetime.datetime object,
    and return the corresponding epoch