Ideal Point Of Sale IdealPoint Of Sale Support
← Support

Lock the date, time and time zone on a POS PC

IdealPOS stamps every sale, payment and clock-in with the clock of the PC that runs the database, and each till applies its own time zone. If someone changes the date in Windows, everything done in the meantime is recorded with the wrong date.

A script stops anyone changing the date, time or time zone in Windows, administrators included. Windows keeps setting the correct time by itself.

You need:

Run it on every PC: first the one that runs the database (its clock dates every record), then each till (its time zone).

The script

One zip with two files: RUN_ME_Lock_Windows_Clock.bat, the one you run, and Lock-WindowsClock.ps1, the script it starts.

  1. 1Extract the zip on the PC

    Download the zip on the PC, or copy it over. Right-click it and choose Extract All…, then use the extracted folder: the script does not run from inside the zip.

  2. 2Run the script

    Double-click RUN_ME_Lock_Windows_Clock.bat and answer Yes when Windows asks for administrator rights. If Windows first warns about a file from the internet, choose Run (or More info → Run anyway).

    In a window that stays open, the script:

    • shows whether the PC sets its time automatically, and who can change the date and the time zone;
    • turns automatic time on if it is off, and synchronises the clock;
    • saves a copy of the current settings in C:\ProgramData\IdealPOS-ClockLock;
    • leaves the right to change the date and the time zone to Windows' own time service only;
    • checks the result, and that nothing else changed.
    == This PC: POS1
           Set time automatically: on (time service: Running, start Manual)
           Change the system time: NT AUTHORITY\LOCAL SERVICE, BUILTIN\Administrators
           Change the time zone:   NT AUTHORITY\LOCAL SERVICE, BUILTIN\Administrators, BUILTIN\Users
       !   NOT locked - an administrator (or, for the time zone, any user) can change them in Settings
    
    == Automatic time
       OK  already on (NTP)
       OK  clock synchronised with the internet time server
    
    == Locking the date, time and time zone
           backup of the current user rights: C:\ProgramData\IdealPOS-ClockLock\user-rights-before-20261030-201929.inf
       OK  Change the system time: NT AUTHORITY\LOCAL SERVICE
       OK  Change the time zone: NT AUTHORITY\LOCAL SERVICE
    
    Done. Sign out and back in (or restart the PC) for it to take effect.

    A full run. Press Enter to close the window.

  3. 3Sign out and back in

    The lock takes effect at the next sign-in: sign out of Windows and back in, or restart the PC. From then on Windows refuses a change of the date, time or time zone.

  4. 4Repeat on every PC

    Do the same on each till. Running the script again on a PC that is already locked changes nothing.

Checking, and changing the date on purpose

The script takes two options. Open the extracted folder, type cmd in its address bar and press Enter, then run one of:

If something goes wrong

Without the script: by hand

On Windows Pro, signed in as an administrator:

  • Settings → Time & language → Date & time: turn Set time automatically on.
  • Press Windows+R, type secpol.msc and press Enter. Open Local Policies → User Rights Assignment.
  • Change the system time: remove Administrators, leaving only LOCAL SERVICE.
  • Change the time zone: remove Administrators and Users, leaving only LOCAL SERVICE.
  • Sign out and back in.