Windowsservercore change time and date

449 views Asked by At

I have a docker running the windowsservercore and I want to change the time in the container to the western European time.

Nothing worked so far

What I tried:

  1. Powershell Set-Date

Set-Date : A required privilege is not held by the

client 2. using w32tm:

C:\BuildAgent>net stop w32time The Windows Time service is not started.

More help is available by typing NET HELPMSG 3521.

====================================================================== Set the SNTP (Simple Network Time Protocol) source for the time server

C:\BuildAgent>w32tm /config /syncfromflags:manual /manualpeerlist:"0.it.pool.ntp.org 1.it.pool.ntp.org 2.it.pool.ntp.org 3.it.pool.ntp.org" The command completed successfully. ============================================= ... and then turn on the time service back on

C:\BuildAgent>net start w32time System error 1058 has occurred.

The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

============================================= Tell the time sync service to use the changes

C:\BuildAgent>w32tm /config /update The following error occurred: The service has not been started. (0x80070426) ======================================================= Reset the local computer's time against the time server

C:\BuildAgent>w32tm /resync /rediscover The following error occurred: The service has not been started. (0x80070426)

Can somone help me? Maybe there is also an option in docker doing this?

0

There are 0 answers