Attempts to parse a date according to the rules in RFC 2822.
但是,此模块已被弃用。在
Deprecated since version 2.3: The email package should be used in preference to the rfc822 module. This module is present only to maintain backward compatibility, and has been removed in 3.0.
看到了吗
http://docs.python.org/library/rfc822.html#rfc822.parsedate
datetime.strptime
将把时间戳转换为日期时间对象,您可以用datetime.strftime
格式化该对象http://docs.python.org/library/datetime.html#strftime-strptime-behavior
在python中,可以使用rfc822模块。此模块提供parsedate方法。在
但是,此模块已被弃用。在
根据这个注释,最好使用email.utils模块中的parsedate方法。在
编辑:
示例代码:
^{pr2}$输出(目前):
相关问题 更多 >
编程相关推荐