Class WindowsClock

java.lang.Object
PamUtils.clock.OSClock
PamUtils.clock.WindowsClock

public class WindowsClock extends OSClock
  • Constructor Summary

    Constructors
    Constructor
    Description
    Some information at https://www.fortect.com/windows-optimization-tips/fixed-non-admin-users-cant-change-time-zone-in-windows-11/ which didn't seem to help bit might with a bit more effort and a reboot.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    setSystemTime(long timeMilliseconds)
    Set the system clock to the given time in milliseconds.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WindowsClock

      public WindowsClock(String osName)
      Some information at https://www.fortect.com/windows-optimization-tips/fixed-non-admin-users-cant-change-time-zone-in-windows-11/ which didn't seem to help bit might with a bit more effort and a reboot. Currently still getting error A required privilege is not held by the client.
      Parameters:
      osName -
  • Method Details

    • setSystemTime

      public boolean setSystemTime(long timeMilliseconds)
      Description copied from class: OSClock
      Set the system clock to the given time in milliseconds.
      Specified by:
      setSystemTime in class OSClock
      Parameters:
      timeMilliseconds - time in millis, UTC, probably from GPS, but might be from internet time.
      Returns:
      true if sucessful.