Show the : character in the timezone offset using datetime.strftime [duplicate]

半城伤御伤魂 提交于 2019-12-04 11:09:38
tynn

Datetime is implemented in C. There you find that the function for tp_str, which is used by Pythons str by default, just calls isoformat().

Further the datetime.strftime method calls the libc strftime function, which gives the timezone difference without a seperator, whereas datetime.isoformat calls a method, which is implemented for Python directly, where a separator can be passed, which is the colon in this case.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!