#1 2010-04-07 23:37

shrapnel09
Member
Registered: 2010-03-04
Posts: 7

Counter doesn't countdown correctly

Hello,

Running Shutter 3.00 Beta 31

I have several machines set to shut down at 11 o'clock and Shutter starts up with Windows and runs the preset to shutdown at 11. Checking on it periodically, some things just don't compute.

shutterbug.png

From the image, you can see that it is currently 5:23PM and the event is scheduled for on time 23:00:00. Where the status should say Time Left 5:36:34, it instead says 2:36:34. On another machine it is listed as 4 hours and 36 minutes remaining until shutdown.

Unfortunately, the event triggers when the status reaches 0:00, which means it's triggering an hour or 3 early.

However, if I Stop and then Start the event, the status is corrected to show the proper amount of remaining time.

Any ideas? If more information is needed, just let me know.

Thanks.

Offline

#2 2010-04-08 23:31

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Counter doesn't countdown correctly

Up to now the "On Time" event was working just like a countdown, with timer been initialized when the event starts. This method prevents the event from working correctly in the event of time change or suspended system state. One of these could've been the cause for your problem.

In the latest development version I have modified the technique used by the "On Time" event to track the destination time point instead of counting down initial time difference. This should fix your problem.

ShutterBeta.zip

P.S. Watch out for the changes in presets format!

Offline

#3 2010-04-09 17:27

shrapnel09
Member
Registered: 2010-03-04
Posts: 7

Re: Counter doesn't countdown correctly

Great! Thanks!

I'll test it out and let you know how the new version works.

Offline

#4 2010-04-12 18:52

shrapnel09
Member
Registered: 2010-03-04
Posts: 7

Re: Counter doesn't countdown correctly

It appears that they are shutting down at the correct time. Though the counter still gets off.
shutter35.PNG

Offline

#5 2010-04-13 12:23

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Counter doesn't countdown correctly

I couldn't reproduce it. Can you try to describe the scenario when this time problem happens?

Try starting from small time differences, e.g. On Time = 13:00:00, if it is now 12:30:00. Then start increasing the time span. Try to spot the circumstances under which the time difference starts to become incorrect and how it deviates, whether there is any pattern.

The "Time Left" value is simply the time difference between current time and destination time, so unless there is something wrong with system time retrieval it just doesn't make sense...

Offline

#6 2010-05-03 18:16

shrapnel09
Member
Registered: 2010-03-04
Posts: 7

Re: Counter doesn't countdown correctly

I'm still experiencing the issues but can't quite track where the problem occurs.

Whereas I was thinking that the problem was occurring over time, I just had an instance where it started up with the wrong count down. Starting and stopping the event got the correct time.

The computers are on an Active Directory. I wonder if the Windows Time Service is getting synced with the AD that causes the countdown to be incorrect.

Would it be possible to modify the 'On Time' event to include a 're-sync time' option so that a person could select to resync the time every hour or so and update the countdown by recalculating the current time and destination time differences?

Offline

#7 2010-05-20 20:59

shrapnel09
Member
Registered: 2010-03-04
Posts: 7

Re: Counter doesn't countdown correctly

With a recent change in hours, computers have been set to shutdown at 5pm instead of 11pm. With that change, I have not run across a computer where the countdown is inaccurate.
Somehow with the extra 6 hours, it gets 2-3 hours off?

Offline

#8 2010-05-21 00:09

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Counter doesn't countdown correctly

On Time event uses GetLocalTime (GetLocalTime at MSDN) to get current local time. I have tried changing time and and time zone while On Time event was running and time left was updated accordingly and correctly. I could not reproduce your problems.

The only possible cause for your problems that I can see now is that GetLocalTime Windows API returns incorrect time.

Please try again with the latest development version, and try changing time and time zones.

Offline

Board footer

Powered by FluxBB