def to_timestamp(str, quyu=None): time = datetime.strptime(str, '%Y-%m-%d %H:%M:%S') rex = re.compile(r'^UTC([0-9+\-]+):00$') shiqu = int(rex.match(quyu).group(1)) c = time.replace(tzinfo=timezone(timedelta(hours=shiqu))) return c.timestamp()
Sign in to make a reply
用户6633323501