How to synchronize time with the Internet. How to synchronize the time on your computer with the Internet? How to synchronize windows time

💖 Do you like it? Share the link with your friends

NET TIME synchronizes a computer's clock with another computer or domain. If used without parameters in a domain Windows Server, displays the current date and time of day set on the computer that is designated as the time server for this domain. This command allows you to set the NTP time server for the computer.

NET TIME Command Syntax

  1. net time [(\\computer_name | /domain[:domain_name] | /rtsdomain[:domain_name])]
  2. net time [\\computer_name]
  3. net time [\\computer_name]], Where
  • \\computer_name - indicates the name of the server on which you want to check the time or with which you want to synchronize the timer.
  • /domain[:domain_name] - specifies the name of the domain with which the clock is synchronized.
  • /rtsdomain[:domain_name] - specifies the domain of the reliable time server (RTS) with which the clock will be synchronized.
  • /set - synchronizes the clock with the time of the specified computer or domain.
  • /querysntp - displays the name of the NTP (Network Time Protocol) server configured for the local computer, or the computer specified in the \\computer_name parameter.
  • /setsntp[:list_NTP_servers] - specifies a list of NTP time servers to use on the local computer.

NET TIME Command Examples

  • net help time- display help for the specified net command;
  • net time \\PC1- displaying the current time of the server on the network for computer PC1;
  • net time /querysntp- displaying the NTP server name for the local computer on the screen;
  • net time \\Proton /set- synchronize the local computer clock with the time of the Proton computer.

Net time system error 5 access denied

People often ask why " System error 5. Access denied" when using Net commands time. I answer, everything is in the rights of the user under which the command is launched. As an example, I tried to run the command first with local administrator rights to

Despite my skepticism about Windows family, sometimes you have to deal with some problems that may occur in this OS.

The next time you turn on your home computer, Windows control 7 I received a complaint about the lack of Internet. At the same time, the browser paid attention to the fact that the time on the local computer is different, and since certificates...

In short, all the fuss was explained by the fact that in motherboard The battery went sour and the system began to “live” in 2008.

Since, naturally, there was no new battery at hand, the question arose about the desirability of synchronizing time via the Internet after turning on the computer and loading the operating system. It would seem that the situation is simple and its resolution is possible in 2 clicks of the mouse, but no - surprise.

Despite correct settings time parameters, and even assigning the nearest time server instead of, for example, time.windows.com, the situation has not changed. The time was not synchronized due to a synchronization failure.

The “root of evil” is that if the time discrepancy between the local computer and the Internet time is more than 15 hours, the time synchronization service ceases to correct the time available in the system to the correct one.

To solve this problem in Windows settings contained in the registry, a number of changes must be made.

Go to the registry branch:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Config



Find MaxNegPhraseCorrection and MaxPosPhraseCorrection and set them to hexadecimal values ​​ffffffff (the letter f 8 times in a row), which is the maximum allowed.


Note. The initial values ​​are 0x0000d2f0
Just in case, check the LargePhraseOffset value
Set the update interval based on the fact that in decimal format it indicates the number of seconds after which the next call to the exact time server will be made.

HCLM\SYSTEM\CurrentControlSet\services\W32Time\TimeProviders\NtpClient



Find the SpecialPollInterval parameter. It precisely determines how often the client accesses the exact time server. The parameter value is set in seconds.


Change the decimal interval from the calculation:
1 minute = 60 seconds,
1 hour = 60 minutes = 3600 seconds,
1 day = 24 hours = 1440 minutes = 86400 seconds.

On one of the resources dedicated to describing the time synchronization mechanism in Windows, it was noted that if this interval is less than 14400 (240 minutes = 4 hours), then NTP server may ban an IP address due to a large number of requests. How true this is, I don’t know. But the gateway on MikroTik, according to its algorithm, checks the compliance of its clocks 4-6 times per hour.

Specify the address of the exact time source that your computer will contact to perform time synchronization.



In the example given, the exact time server address is time.net.org. Such a server does not actually exist, it is local server time located on the router. For your needs, find the nearest time server to you.

For example, you can use the information provided on http://www.ntp-servers.net, http://www.timeserver.ru, http://gladilov.org.ru/ntp

The above changes to the Windows registry can be made in one file with the reg extension. Create a file in Notepad with the following content:

Windows Registry Editor Version 5.00


"MaxNegPhraseCorrection"=dword:ffffffff
"MaxPosPhraseCorrection"=dword:ffffffff


"NtpServer"="time.net.org,0x01"

Save it as, for example, Timecorrect.reg After that, you can run it and the necessary changes will be written to the registry. Change the value "NtpServer"="time.net.org,0x01" to your own (see text above). Download this file.

If your firewall is running in a very high security configuration, you can create allowing rules for incoming and outgoing connections to UDP port 123.

To correct the time, you can use a file with the bat extension, the content of which is the line: w32tm /resync This bat file must be launched under system administrator rights (run as administrator).

Create in notepad text file with the contents of w32tm /resync and save it as a file with a bat extension, for example timesync.bat

But, as practice has shown, launching this file turned out to be not enough. The command line produced:
The following error was encountered: Service is not running (0x80070426)

It turns out that the time service in Windows 7 (it was different in Windows XP) will not be disabled only if it was started manually through the Services window or using the Refresh Now synchronization button in the Time and Date window.

To correct this situation, in command line(with administrator rights), enter the following commands:

1. net stop w32time – stop the time service if it is running.
2. w32tm /debug /disable – disable debugging mode.
3. w32tm /unregister – delete service registration.
4. w32tm /register – register the service again.
5. sc triggerinfo w32time start/networkon stop/networkoff – specify the service to start when connected to the network and stop when disconnected from the network.

After command 5 you should see:

ChangeServiceConfig2: success

We try again in the command line with administrator rights to run the bat file with the contents:

W32tm/resync
pause

The second pause line is necessary to see the result of the w32tm /resync command.


I just want to exclaim: my God, how neglected everything is! But based on the description of the service, you might think that it still works after the system starts, albeit with a delay:



You may have noticed that the operating room Windows system 7 can independently, without your intervention, change the time (clock). This is especially true when there is a transition from winter time to summer time, and vice versa. This process is called time synchronization.

The operating system receives data from the servers. They, in turn, transmit data to your computer and if they do not agree, then the time is automatically adjusted. But there are situations when this synchronization does not occur, or occurs but the time on the clock is not set correctly. We will learn how to fix this problem right now.

First, we need to find out what types of time synchronization servers there are. So that you don’t have to look for them for a long time, I will post a list of available Russian and Ukrainian servers:
For Russia:
timeserver.ru
ntp.mobatime.ru
ntp1.stratum2.ru
ntp2.stratum2.ru
ntp3.stratum2.ru
ntp4.stratum2.ru
For Ukraine:
time.in.ua

Now let's move directly to setting up time synchronization in Windows 7. To do this, right-click on the clock, which is located in the lower right corner of your screen (on the taskbar).


Next, click " Changing date and time settings".


The "Date and Time" window will open, in which you will see three tabs: " date and time", "Additional hours " And " Internet time". Just last tab that's what we need. Click on it. In it you will learn that your computer is synchronized with the server " time.windows.com". Accordingly, if your watch does not show the correct time, then you need to change the server - click on the button " Change settings".


The dialog box " Setting the time via the Internet". In it you will see a line in which you can enter any time server other than the one installed by default. Copy the address of any time synchronization server that is listed at the beginning of this article and paste it into this line " Server ". And then click " Update now".


After a few seconds, the synchronization process will complete and the time on your computer will change. Then simply click "OK" and close the "Date and Time" window.

The Windows clock is located in the lower right corner of the screen on the taskbar next to the “ ” button. language bar, other elements and open by clicking on them with the left button. In order for the system clock to show accurately, it is necessary.

Synchronization occurs with the Internet server and your PC's time is automatically updated. By default, updates occur every 7 days while the Internet is connected. In the article we will look at how to enable synchronization, how to speed up time updating with the server, and what program you can use.

How to enable and configure time synchronization on Windows 7, 8

Note: Internet time synchronization is enabled by default in Windows.

To get started, you will need to select small or large icons in the viewing area. Next in the list, click “date and time”.

This will open the date and time options. You can also call them by left-clicking in the date and time display area and select the corresponding link (shown in the screenshot).

In the window, go to the “Internet time” section; here you can see information about the current synchronization with the name of the server (if it is enabled). By default, Internet synchronization is performed with a Microsoft server called time.windows.com. To change settings, click “change settings” and “yes” (if User Account Control is enabled).

In the Internet time settings, the option “ synchronize with time server" Select one of the pre-installed servers or define your own (the list of servers can be found here http://support.microsoft.com/ru-ru/kb/262680). Next, click “update now” to synchronize the time on your computer with the Internet. If synchronization is successful, you will see a notification in the same window.

To synchronize time via the Internet, you can use various utilities such as:

  1. Atomic Clock Sync
  2. NetTime
  3. SP TimeSync
  4. Other

All aspects of synchronization are configured through the programs, and the update request interval is reduced. Using standard methods, you can also synchronize the time on your computer with the Internet more quickly and more often; read on to find out how to do this.

How to reduce the time update interval from the Internet

There may be a situation where the time is constantly lost due to problems with the system clock, even if you have time synchronization enabled on your computer. The solution to the problem is to edit the NTP client to speed up the update period. Depending on the OS version you will need:

In the registry, go to the NtpClient section (the full path is shown in the picture below). IN right side editor, double-click on the SpecialPollInterval parameter. Next, in the number system area, select "decimal" and the value field will contain the number 604800, which represents 7 days in seconds.

For example, if you want to synchronize the time on your computer with the Internet every day, then enter the value 86400, which is calculated using the formula 60 seconds * 60 minutes * 24 hours * 1 day. Set your number of seconds and click OK.

Note: Do not set the value less than 14400 seconds (4 hours), otherwise your computer's IP address may be blocked by the time server.

You can also speed up syncing manually, but getting to the "update now" button is a lot of steps. In this case, you can use cmd. To do this, you need to , 8 as administrator, and then enter the command below and press enter.

Note: the command will work if time synchronization via the Internet is enabled.

To speed up the process further, copy the synchronization command into it. Next, place the file on your desktop or pin it to the taskbar and run it as administrator.

Preventing problems during synchronization

It is not always possible to set the exact time through synchronization with the Internet. You may encounter the following problems and solutions:

  1. Make sure that the time zone, date and time are manually set correctly on your computer, otherwise you will have trouble trying to synchronize your computer clock with an Internet time server.
  2. Windows gets its initial time from the BIOS, so make sure the time and date are set correctly in the CMOS BIOS.
  3. Check the CMOS battery on the motherboard. If it is weak, then your clock may run slower, losing or resetting time. If so, then you simply need to replace the CMOS battery.
  4. If your computer does not keep accurate time even after enabling synchronization and changing time servers, read above about changing the update interval.

As you can see, synchronize time on your computer with the Internet in Windows 7, 8 for accurate display is not difficult. Everything can be done using standard Windows steps. The programs will only reduce the cost of your time, for example, they will reduce the synchronization time in two clicks.

Maybe someone will find it useful.

What to do if the exact time is not set on the computer (automatically or at all)? And what are we even talking about?

Right-click on the clock in the taskbar and select the menu item Setting the date and time(the computer user must have Administrator rights). The settings window will open on the tab date and time. Here the date and time can be set manually; if the deviation from reality is large (more than a few minutes), it is better to do this, even if you intend to do automatic setup, because if the initial deviation is large, the automatic procedure will not work (remember to check and set the date too!)

Go to bookmark Timezone and check if your belt is selected correctly.

Go to bookmark Internet time. Check the box if it is missing Synchronize time on the Internet, then click on the button Update now. After a few seconds or a couple of minutes, a message indicating the success or failure of synchronization will appear in the window.

If the synchronization was successful, this means that in the future your computer, now automatically, will set the exact time - once a week. If you're happy with this, you don't have to read any further; if synchronization does not work or you are not satisfied with the weekly interval, read on.

What could be the reasons for the lack of synchronization and what to do about it?

1. In the field (drop-down list) Server to the left of the button Update now An inoperative/invalid time server was specified. Most often this is the time.windows.com server. Expand the list and select another server (usually the list consists of two items and the second is time.nist.gov). Press the button again.

2. Check if you are connected to the Internet. It is necessary that the firewall and router allow UPP packets to pass on port 123 (ie NTP protocol). Normal Settings Windows Firewall and “household” routers are exactly like that; if the Internet provider or system administrator of the organization where the computer is located filters traffic, ask “to open UDP port 123.”

3. It may turn out that all the servers on the list are inoperative. Unfortunately, the list of servers cannot be edited by simple means, and read below about how to do this.

How to edit the list of servers, connection order and check interval?

Attention - the editing procedure is described below Windows registry. Do not change other registry settings other than those described; damage to the registry can lead to Windows not working!

1. Open Registry Editor: button Start, Further Execute, type regedit and press the key Enter.

2. On the left side of the window, in the registry settings tree, select

3. In the right part of the window, click on the parameter name (number 1 or 2 in the left column) and edit the address of the exact time server - set a valid address instead of a non-working one (addresses can be easily found through Google - query “precise time server” or “ntp server”) .

3. If necessary, also edit the parameter (default), which specifies the default server number (1 or 2) (this setting can also be changed without Registry Editor, as described above).

4. Now go to the section

5. Here we may be interested in the parameter SpecialPollInterval. It contains the interval between attempts to check the exact time, in seconds. By default, this is a week (do the math yourself - a ton of seconds). If this interval does not suit you (for example, the clock is not very accurate and runs away in a week, or the computer is often disconnected from the Internet, and the week can stretch for many weeks), the parameter can be edited. Click on its name in the left column.

Flip the switch Number system to position Decimal(if, of course, you need it) and enter the required number in the field Meaning, press OK. You should not set values ​​less than half an hour (1800).

6. Close the Registry Editor window.



tell friends