Converting utc time string to datetime object

后端 未结 4 1970
失恋的感觉
失恋的感觉 2021-01-01 11:23

I\'m using the Paypal API and I get back a timestamp in the following format. It try to parse this to a datetime object using strptime, but I get the following error:

<
4条回答
  •  粉色の甜心
    2021-01-01 11:49

    You have a typo. %M is used twice. You meant to use %m for the month. From the docs:

    %m  Month as a decimal number [01,12].   
    %M  Minute as a decimal number [00,59].
    

提交回复
热议问题