[New-bugs-announce] [issue25155] datetime.datetime.now() raises

Vitaly Murashev report at bugs.python.org
Thu Sep 17 21:25:40 CEST 2015


New submission from Vitaly Murashev:

Current time on my machine with Windows7x64 is set to year 2045 for test purposes.
Since Python3.5(amd64) I have an OverflowError when I am trying to call datetime.datetime.now()

It looks like a regress since there was no such error on Python3.4.3

Could anyone please give me a note, whether it would be reasonable for me to wait for a patch in Python3.5.x, or such behavior is common since 3.5 and should not use it in my 'strange' case at all ? 

A bit of details:

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: timestamp too large to convert to C _PyTime_t
>>>

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now()
datetime.datetime(2045, 4, 2, 2, 42, 8, 359375)
>>>

----------
components: Interpreter Core, Windows
messages: 250914
nosy: paul.moore, steve.dower, tim.golden, vmurashev, zach.ware
priority: normal
severity: normal
status: open
title: datetime.datetime.now() raises
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25155>
_______________________________________


More information about the New-bugs-announce mailing list