Clock is not correct when returning from hibernation

Make comments, ask questions, or just complain about the software on this site. Or comment on any educational software.
Please note that by clicking on links that may appear in these posts that you may be leaving the Dale Harris Educational Software website and that the content of those sites is the sole resposibility of the authors of those sites.

Moderators:daleadmin, Dale Harris, Alan, Andrew

Post Reply
oeb
Forum Regular
Posts:22
Joined:Tue Jul 28, 2009 5:50 am
Location:Norway
Contact:
Clock is not correct when returning from hibernation

Post by oeb » Tue Jul 28, 2009 8:26 am

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.

User avatar
Dale Harris
Forum Owner
Posts:1171
Joined:Sun Dec 28, 2003 10:19 pm
Location:Chicago
Contact:

Re: Clock is not correct when returning from hibernation

Post by Dale Harris » Tue Jul 28, 2009 10:37 pm

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.
Dale

oeb
Forum Regular
Posts:22
Joined:Tue Jul 28, 2009 5:50 am
Location:Norway
Contact:

Re: Clock is not correct when returning from hibernation

Post by oeb » Wed Jul 29, 2009 5:45 am

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?

User avatar
brucef2112
Forum Regular
Posts:336
Joined:Mon Mar 06, 2006 11:19 pm
Location:Broward County, Floriduhh
Contact:

Re: Clock is not correct when returning from hibernation

Post by brucef2112 » Wed Sep 02, 2009 11:09 pm

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.
Later,
Bruce

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
Benjamin Franklin - Historical Review of Pennsylvania, 1759

User avatar
daleadmin
Forum Owner
Posts:1279
Joined:Tue Dec 30, 2003 9:47 pm

Re: Clock is not correct when returning from hibernation

Post by daleadmin » Wed Sep 02, 2009 11:27 pm

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

User avatar
brucef2112
Forum Regular
Posts:336
Joined:Mon Mar 06, 2006 11:19 pm
Location:Broward County, Floriduhh
Contact:

Re: Clock is not correct when returning from hibernation

Post by brucef2112 » Thu Sep 03, 2009 12:50 am

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.
Later,
Bruce

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
Benjamin Franklin - Historical Review of Pennsylvania, 1759

User avatar
brucef2112
Forum Regular
Posts:336
Joined:Mon Mar 06, 2006 11:19 pm
Location:Broward County, Floriduhh
Contact:

Re: Clock is not correct when returning from hibernation

Post by brucef2112 » Thu Sep 03, 2009 1:36 am

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
Later,
Bruce

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
Benjamin Franklin - Historical Review of Pennsylvania, 1759

Post Reply

Who is online

Users browsing this forum: No registered users and 48 guests