时间 '2018-08-06T10:00:00.000Z' 格式转化为本地时间(转)
生活随笔
收集整理的這篇文章主要介紹了
时间 '2018-08-06T10:00:00.000Z' 格式转化为本地时间(转)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
?原文:https://blog.csdn.net/sxf_123456/article/details/81582964
from datetime import datetime,timedelta
#bucket['key_as_string']=?'2018-08-06T10:00:00.000Z'?
date_ = datetime.strptime(bucket['key_as_string'],"%Y-%m-%dT%H:%M:%S.%fZ")
#local_time =?2018-08-06 18:00:00
local_time = date_ + timedelta(hours=8)
轉載于:https://www.cnblogs.com/Stephen-Qin/p/11001743.html
總結
以上是生活随笔為你收集整理的时间 '2018-08-06T10:00:00.000Z' 格式转化为本地时间(转)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 爱山东如何切换账号(汉典爱字的基本解释)
- 下一篇: 如何解决iPhone 12信号差问题信号