PDA

View Full Version : QTimer problem with Date/Time



bhavikdhoot
11th May 2011, 14:39
Hi,

I'm using Qt 4.7.1 on a Unix platform. The problem is that i've an application which has an implementation of Date/Time, for e.g. changing the date.

Now the issue is like this:-

My current date is set to today's date i.e. 11.05.2011. Now, if I change my date to 7 or more years back for e.g. 11.05.2004 or 11.05.2000, then the QTimer events stops firing.
The same works fine if i change the date to 11.05.2010 or 11.05.2005. (i.e. less than 7 yrs gap).

Any help would be appreciated. Thanks in advance!

Regards,
Bhavik.

wysota
11th May 2011, 15:26
Don't use QTimer then. Try using timerEvent().

bhavikdhoot
12th May 2011, 11:12
Hey thanks for the reply,

On debugging, we came to know that the problem was with clock_gettime() implementation inside the code and not with QTimer's.