Hack #7. Set Your Clock Back

Avoid or test date- and time-related features of your programs by setting the system clock back or ahead in the BIOS.

Setting the system date and time backwards or forwards is one way to see how a program behaves on different dates, ensure that a scheduled event runs, or make sure a program expires when it is supposed to.

Tip

This hack is most useful for testing purposes only. In normal use it is not practical to hold your system clock back or force it forward because scheduled events such as backups, virus scans and updates, file records, and data such as email arrival and send times will become very confused and may not function properly.

This hack will probably not let you bypass the expiration dates of trial software, Windows XP activation, or other rights-management technologies, as many of these programs keep track of radical time setting changes or number of uses in the registry or protected files. I certainly do not advocate such deceptive practices.

You might think that waiting until the operating system is done loading and then using the date and time functions at a DOS prompt or within Windows would be sufficient to fool a specific program, but some programs may not be easily fooled from within Windows.

Don't wait for the operating system; make these time-altering changes in the BIOS setup program to ensure that the operating system starts with the date or time you want—date and time setting is a basic function within setup. Be careful of changing the date if you're going to run your real, live accounting software (or other time-specific programs you rely on) or you could end up unbalancing the books.

If you are using the Windows Time service or one of many "atomic clock" programs to obtain an accurate date and time from one of the many online time servers, be sure to disable these in Windows before resetting the date and time in BIOS. Follow these steps to disable the Windows Time service:

  1. Go to StartControl PanelAdministrative Tools.

  2. Double-click Services.

  3. Scroll down to find Windows Time and either double-click on the service name or right-click and select Properties.

  4. At the "Startup type:" box, select Disabled.

  5. Click OK to save the value and close the dialog.

  6. Restart your PC, and then enter the setup program and adjust the date and time to suit your needs before restarting Windows and running your application or tests.

Get PC Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.