wxDefaultDateTime.IsValid() == false

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
mybofy
Knows some wx things
Knows some wx things
Posts: 26
Joined: Fri Aug 07, 2015 2:09 pm

wxDefaultDateTime.IsValid() == false

Post by mybofy » Fri Feb 01, 2019 4:30 pm

Bonjour

wxwidgets 3.1.2

Why "wxDefaultDateTime.IsValid()" is always false ?

Value of wxDefaultDateTime is : 292278994-08-16_17-47-04 !!!

Merci

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3160
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDefaultDateTime.IsValid() == false

Post by ONEEYEMAN » Fri Feb 01, 2019 4:51 pm

Hi,
Because datetime object has to be initialized with either calling Now() or by some other means.

Its very easy and cheap to do

Code: Select all

wxDateTime dt = wxDateTime::Now();
as it just calls the CRT function.

Thank you.

Post Reply