How to convert current date to epoch timestamp?

前端 未结 9 2324
情话喂你
情话喂你 2020-12-14 05:41

How to convert current date to epoch timestamp ?

Format current date:

29.08.2011 11:05:02
9条回答
  •  -上瘾入骨i
    2020-12-14 06:13

    import time
    def expires():
        '''return a UNIX style timestamp representing 5 minutes from now'''
        return int(time.time()+300)
    

提交回复
热议问题