<s> import pytz <EOL> import datetime <EOL> import time <EOL> def datetime_to_timestamp ( datetime ) : <EOL> """<STR_LIT>""" <EOL> time_without_ms = time . mktime ( datetime . timetuple ( ) ) * <NUM_LIT:1000> <EOL> ms = int ( datetime . microsecond / <NUM_LIT:1000> ) <EOL> return time_without_ms + ms <EOL> def timestamp_to_datetime ( timestamp ) : <EOL> """<STR_LIT>""" <EOL> return datetime . datetime . fromtimestamp ( timestamp / <NUM_LIT> ) . replace ( tzinfo = pytz . UTC ) </s>
