wx.DateFromTimeDMY(1,0,1970) kills interpreter

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

···

****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface. This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************
    
IDLE 1.0

import wx
wx.__version__

'2.5.2.8'

wx.DateTimeFromDMY(1,0,1980)

<wx.DateTime: "01/01/80 00:00:00" at _98d43701_p_wxDateTime>

wx.DateTimeFromDMY(1,0,1970)

================================ RESTART ================================

Well, I'd say this is an error in the error handling.
1,0,1970 is an invalid date, since there is no month 0

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on
win32 Type "copyright", "credits" or "license()" for more information.

    ****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface. This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************

IDLE 1.0

>>> import wx
>>> wx.__version__

'2.5.2.8'

>>> wx.DateTimeFromDMY(1,0,1980)

<wx.DateTime: "01/01/80 00:00:00" at _98d43701_p_wxDateTime>

>>> wx.DateTimeFromDMY(1,0,1970)
>>>
>>> ================================ RESTART
>>> ================================

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

- --
  UC

- --
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417

···

On Monday 11 October 2004 05:57 pm, Tom McDermott wrote:

0 is january, the first month

···

On Tuesday 12 October 2004 07:12 am, you wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, I'd say this is an error in the error handling.
1,0,1970 is an invalid date, since there is no month 0

The problem call - wx.DateFromTimeDMY(1,0,1970) - is called, directly or indirectly, several times in the initialization of the wx.masked.TimeCtrl widget. This causes the TimeCtrl pane of the wxPython demo to die horribly, for example.

So the obvious solution - "don't do that them" - doesn't cut it.

Tom

Kenneth Gonsalves lawgon-at-thenilgiris.com |wxPython| wrote:

···

On Tuesday 12 October 2004 07:12 am, you wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, I'd say this is an error in the error handling.
1,0,1970 is an invalid date, since there is no month 0

0 is january, the first month

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Tom McDermott wrote:

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

Works fine here. The only difference I can see is I'm using a newer version of Python.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Tom McDermott wrote:

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

Works fine here. The only difference I can see is I'm using a newer version of Python.

I know there have been bug fixes on some of the win32 date time code for this kind of thing and there may be similar bugs in other python functions...

David

Is there any additional information I can supply that will help?

It's not just my PC - I've hit the same problem on four separate windows boxen. (2 running XP, 2 running 2000).

Tom

Robin Dunn robin-at-alldunn.com |wxPython| wrote:

···

Tom McDermott wrote:

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

Works fine here. The only difference I can see is I'm using a newer version of Python.

Robin Dunn wrote:

Tom McDermott wrote:

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

Works fine here. The only difference I can see is I'm using a newer version of Python.

Another thought. What is your timezone? What happens if you set it to another one? Perhaps this is a timezone related issue...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Ah-ha!
Really, I'm in GMT-10:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

H:\>python
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.tzname
('AUS Eastern Standard Time', 'AUS Eastern Daylight Time')
>>> time.timezone
-36000
>>> import wx
>>> wx.DateTimeFromDMY(1,0,1970)

H:\>

But if I change to Pacific Time (GMT-8), it works:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

H:\>python
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.tzname
('Pacific Standard Time', 'Pacific Daylight Time')
>>> import wx
>>> wx.DateTimeFromDMY(1,0,1970)
<wx.DateTime: "01/01/70 00:00:00" at _f0f53101_p_wxDateTime>
>>> time.timezone
28800
>>>

Robin Dunn robin-at-alldunn.com |wxPython| wrote:

···

Robin Dunn wrote:

Tom McDermott wrote:

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

Works fine here. The only difference I can see is I'm using a newer version of Python.

Another thought. What is your timezone? What happens if you set it to another one? Perhaps this is a timezone related issue...

Typo - really _really_, I'm in GMT+10:00.

Tom McDermott le3zmev02-at-sneakemail.com |wxPython| wrote:

···

Ah-ha!
Really, I'm in GMT-10:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

H:\>python
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.tzname
('AUS Eastern Standard Time', 'AUS Eastern Daylight Time')
>>> time.timezone
-36000
>>> import wx
>>> wx.DateTimeFromDMY(1,0,1970)

H:\>

But if I change to Pacific Time (GMT-8), it works:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

H:\>python
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.tzname
('Pacific Standard Time', 'Pacific Daylight Time')
>>> import wx
>>> wx.DateTimeFromDMY(1,0,1970)
<wx.DateTime: "01/01/70 00:00:00" at _f0f53101_p_wxDateTime>
>>> time.timezone
28800
>>>

Robin Dunn robin-at-alldunn.com |wxPython| wrote:

Robin Dunn wrote:

Tom McDermott wrote:

When I call wx.DateTimeFromDMY(1,0,1970),
the Python interpreter dies.
(Actually, this gets called by wx.masked.TimeCtrl)

Any suggestions? I'm running windows XP.

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

Works fine here. The only difference I can see is I'm using a newer version of Python.

Another thought. What is your timezone? What happens if you set it to another one? Perhaps this is a timezone related issue...

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org