Page 1 of 1

Clock is not correct when returning from hibernation

Posted: Tue Jul 28, 2009 8:26 am
by oeb
If the computer is set to hibernate at night or at a power outage the POS clock will simply continue where it left off, i.e. it is not synchronized with the system clock. There is no way to reset the clock in POS, you have to exit the program and start it again to the get clock right. It took me a while to figure out why the clock kept getting unsynchronized.

Re: Clock is not correct when returning from hibernation

Posted: Tue Jul 28, 2009 10:37 pm
by Dale Harris
oeb,

I do not know how this is possible since the POS program has no clock in the sense that it somehow keeps track of the time. Whenever the POS program displays the time it gets the time from the system clock.

Re: Clock is not correct when returning from hibernation

Posted: Wed Jul 29, 2009 5:45 am
by oeb
This is running on Windows 7 RC. I can check if the same happens on Vista/ XP.

Speaking of time, is there any way to get POS to show a 24H clock rather than AM/ PM?

Re: Clock is not correct when returning from hibernation

Posted: Wed Sep 02, 2009 11:09 pm
by brucef2112
Dale,
I haven't seen this actual event with hibernate. However, I did find a quirky thing with DHPOS and the time/date that would make this hibernate thing a real problem.

Way back in the 6.xx days I had some spare time in between biting my nails and contemplating my belly button and found myself watching the seconds tick by on the main menu of DHPOS which was open in a DOS window. Soon I was compelled to open the Time/Date property window and change the date and time. To my surprise DHPOS's clock didn't update to the change. I then opened a separate DOS window and used the TIME command to change the time. It did change the time on the clock in the system tray however back at DHPOS it still "did not get the memo".

I thought that maybe going to any of the DHPOS menu items and then returning to the main menu would refresh it with the new time but it didn't (ie Rang up a sale and it still had the old date/time on the transaction). DHPOS seems to hold onto the date/time it was given on startup and keeps "counting" from there regardless of any changes to the system clock. Or in the case of hibernating it seems to just stop "counting" until it wakes up from hibernating.

In theory this has the potential to mess with all time events in DHPOS. (selling time, time cards, sales transactions, close register, etc.)
Seems DHPOS needs to force a date/time update before its about to do anything with date/time stamp.

Ive tested with 4 different computers. all with different hardware, OS (win2k, XP), and versions of DHPOS.

Re: Clock is not correct when returning from hibernation

Posted: Wed Sep 02, 2009 11:27 pm
by daleadmin
Bruce,

You could try just not screwing with the system time setting. That would be fine with me.

On the other had this could be a good thing. If someone comes in late and wants to change the system time so that he can punch in on time the problem you found will prevent this.

So then this is offical. This is not a bug, it is a feature.

Dale

Re: Clock is not correct when returning from hibernation

Posted: Thu Sep 03, 2009 12:50 am
by brucef2112
Yeah, I thought the same thing about someone coming in late and changing the clock and figured this was a great feature too. However there is still the problem of selling time. If the puter goes to hibernate then none of the time during hibernation will be accounted for. ie customer plays pool for 3hrs and only gets charged for a fraction of the time because the puter went to hibernate.

Just for fun I started DHPOS then forced Windows to hibernate. Came back three minutes later and started the puter again and sure enough the DHPOS clock was behind about 3 minutes from the system clock. BUT WAIT THERE'S MORE! When the puter came back up I notice that not only was the clock in DHPOS behind BUT it was now counting double time. Every second from the system clock was two seconds in DHPOS! It was as if it was trying to catch up to the system clock! So I waited and in fact that is what it did. As soon as the DHPOS's clock caught up to the system clock it fell back into candence with the system clock! What Fun!!

Microsoft and all the hardware folks have been trying to get this hibernate stuff right since 98. Aside from this clock thing with DHPOS, HIBERNATE is still a broken dream.

Dale, I sugest adding this to the user manual right after the Don't use Serial Printers advice.
More Advice to all users: DO NOT USE HIBERNATE with DHPOS.

Re: Clock is not correct when returning from hibernation

Posted: Thu Sep 03, 2009 1:36 am
by brucef2112
For those who insist on having their puters hibernate and still expect DHPOS to work, try this compromise.
Instead of using the POS.EXE to start DHPOS directly, use a batch file to start it.
In the batch file, temporarely turn hibernate off while running POS and turn it back on once POS is closed.

Maybe name the batch file REGISTER.BAT and save it to your POS directory.

Code: Select all

@ECHO OFF
powercfg /HIBERNATE OFF
POS.EXE
powercfg /HIBERNATE ON
This will turn hibernation off while running DHPOS and then turn it back on once the program is closed.
Powercfg is an administrative tool so for this to work the Windows User must have admin rights.
Tested in Win XP. Should work with Win2000 thru Win7