I have written a program that uses wx and it stopped working on
February 1st. On all platforms and even older versions that used to
run fine stopped working.
If I change the system date back to January the program is running
again fine.
And the error message:
13:41:51: Debug: ..\..\src\common\datetime.cpp(1466): assert "(0 <
day) && (day <= GetNumberOfDays(month, year))" failed in
wxDateTime::Set(): Invalid date in wxDateTime::Set()
I have written a program that uses wx and it stopped working on
February 1st. On all platforms and even older versions that used to
run fine stopped working.
If I change the system date back to January the program is running
again fine.
And the error message:
13:41:51: Debug: ..\..\src\common\datetime.cpp(1466): assert "(0<
day)&& (day<= GetNumberOfDays(month, year))" failed in
wxDateTime::Set(): Invalid date in wxDateTime::Set()
In addition to the platform and version you are using it would be helpful to know what your timezone and locale settings are, as there is a fair bit of timezone specific code in wx.DateTime.
As Wener mentioned the date you use above is invalid because of the zero-offset of the months, (wx.DateTime.Jan is zero and wx.DateTime.Dec is 11) so what was the actual date in your application that started having problems on Feb 1st? Was it related to Feb 1st in any way?
···
On 2/7/10 4:49 AM, sbaechler wrote:
Hi
I have written a program that uses wx and it stopped working on
February 1st. On all platforms and even older versions that used to
run fine stopped working.
If I change the system date back to January the program is running
again fine.
And the error message:
13:41:51: Debug: ..\..\src\common\datetime.cpp(1466): assert "(0<
day)&& (day<= GetNumberOfDays(month, year))" failed in
wxDateTime::Set(): Invalid date in wxDateTime::Set()
I have written a program that uses wx and it stopped working on
February 1st. On all platforms and even older versions that used to
run fine stopped working.
If I change the system date back to January the program is running
again fine.
Actually, I'll bet real dollars that the scenario you encountered was
actually this:
enddate = wx.DateTimeFromDMY( 30, month = 1, year = 2010 )
And the error message:
13:41:51: Debug: ..\..\src\common\datetime.cpp(1466): assert "(0 <
day) && (day <= GetNumberOfDays(month, year))" failed in
wxDateTime::Set(): Invalid date in wxDateTime::Set()
The line I show will cause that error, because "month=1" is February,
and there is no such thing as February 30.
···
On Feb 7, 4:49 am, sbaechler <s...@feinheit.ch> wrote:
--
Tim Roberts
Providenza & Boekelheide, Inc.