<p>我正在处理一个IMAP邮箱,在使用mxDateTime包解析日期时遇到问题。尤其是像“1904年1月1日星期五00:43:25-0400”这样的早期约会会带来麻烦:</p>
<pre><code>>>> import mx.DateTime
>>> import mx.DateTime.ARPA
>>> mx.DateTime.ARPA.ParseDateTimeUTC("Fri, 1 Jan 1904 00:43:25 -0400").gmtoffset()
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
Error: cannot convert value to a time value
>>> mx.DateTime.ARPA.ParseDateTimeUTC("Thu, 1 Jan 2009 00:43:25 -0400").gmtoffset()
<mx.DateTime.DateTimeDelta object for '-08:00:00.00' at 1497b60>
>>>
</code></pre>
<p>请注意,与2009年几乎相同的日期可以正常工作。我在mxDateTime中找不到任何关于日期限制的描述。你知道为什么会这样吗?在</p>
<p>泰铢</p>
<p>雷蒙</p>