Sign in to follow this  
Followers 0
acidam

How to set my PC's Date and Time

21 posts in this topic

I want my PC syncronized with a NTP server at boot time.

How to do this ?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

please delete this entry

Edited by acidam

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

please delete this entry

Edited by acidam

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

First: Wait at least 24 hours before bumping a thread!

Second: Did you sarch the forum for "NTP"? The first hit I got has a that seems to do what you want.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

What about being a little patient and wait at least 24 hours to bump your thread?

One common reason for not getting an answer fast is that your question isn't clear.

So what is your AutoIt3 question here?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You could also use windows' internet time synchronisation.

The registerey keys "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" and "HKLM\SYSTEM\CurrentControlSet\services\W32Time" contain information about servers used, update interval and more.

If you write your own application, then make sure to disable it in windows.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

You could also use windows' internet time synchronisation.

The registerey keys "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" and "HKLM\SYSTEM\CurrentControlSet\services\W32Time" contain information about servers used, update interval and more.

If you write your own application, then make sure to disable it in windows.

You can just double-click the time display in the tray, select the tab for 'internet time' and check the box.

William

Edited by saywell

Share this post


Link to post
Share on other sites

You can just double-click the time display in the tray, select the tab for 'internet time' and check the box.

And where would you add a server, or change the interval?

Share this post


Link to post
Share on other sites

the built-in timeserver service does not work in my situation.

When my PC starts, it shows 1970/01/01 00:01:00 and when I push

clock in system tray and want to correct the time with a NTP server

there comes a Message, that the time difference is too big.

So, I want to do the job by an Autoit script.

But I am a very beginner in Autoit.

Any support welcome.

Thanks

Share this post


Link to post
Share on other sites

Then take a look at the last script in (Found through the link, Water posted).

Try to change the server to yours and test if it works.

Once it works, you can make it run on startup by adding it to the startup folder in the start menu. (There are other ways too, but this one is nice and simple)

Share this post


Link to post
Share on other sites

does not work, but claims an authorisation problem

Share this post


Link to post
Share on other sites

Try adding #RequireAdmin at the top.

I'm not sure if the return value of NTP servers is always the same, so you might get some useless results at first.

Share this post


Link to post
Share on other sites

the built-in timeserver service does not work in my situation.

When my PC starts, it shows 1970/01/01 00:01:00 and when I push

clock in system tray and want to correct the time with a NTP server

there comes a Message, that the time difference is too big.

So, I want to do the job by an Autoit script.

But I am a very beginner in Autoit.

Any support welcome.

Thanks

Is there a reason for the start time being reset to 1970 [unix epoch]? Or is it just that the motherboard battery has died, so it 'forgets' the time when the PC is powered down?

If the latter, then a more permanent fix beckons...

William

Share this post


Link to post
Share on other sites

Is there a reason for the start time being reset to 1970 [unix epoch]? Or is it just that the motherboard battery has died, so it 'forgets' the time when the PC is powered down?

If the latter, then a more permanent fix beckons...

William

How can I determine, if the motherboard battery has died ?

My PC is running on 220V AC, not on battery.

Share this post


Link to post
Share on other sites

There is a battery on the motherboard that makes sure the clock keeps going and settings are saved when the computer loses power.

If this battery is dead you would have your system reset to the bios default each time power to the motherboard is lost.

If you don't know the reason your time is reset on each reboot, there is a good chance the battery is the reason.

You can do a little test by changing some unimportant bios setting. (like enable, or disable the floppy drive), then turn off the PC and turn it on again a few minutes later. If the setting has gone back to what it was before you changed it I'd assume it's the battery.

Share this post


Link to post
Share on other sites

....

You can do a little test by changing some unimportant bios setting. (like enable, or disable the floppy drive), then turn off the PC and turn it on again a few minutes later.

If the setting has gone back to what it was before you changed it I'd assume it's the battery.

how to change a "bios setting" ? Is it in the "system settings" ?

Share this post


Link to post
Share on other sites

No, you need to reboot your PC and then right at the start press a key to enter the bios. I believe Delete, F1, F2 or F10 are used often. Delete being the one I see most often.

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

And on some sytems the BIOS is refered to as System Settings at startup.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

And on some sytems the BIOS is refered to as System Settings at startup.

:graduated:

Share this post


Link to post
Share on other sites

There is a battery on the motherboard that makes sure the clock keeps going and settings are saved when the computer loses power.

If this battery is dead you would have your system reset to the bios default each time power to the motherboard is lost.

If you don't know the reason your time is reset on each reboot, there is a good chance the battery is the reason.

You can do a little test by changing some unimportant bios setting. (like enable, or disable the floppy drive), then turn off the PC and turn it on again a few minutes later. If the setting has gone back to what it was before you changed it I'd assume it's the battery.

I managed to enter the BIOS. And could alter the floppy settings. But pushing the power button OFF and after 30 sec ON did not alter the BIOS setting and the clock was OK.

Then I tried again and switched ALL computer equipement OFF by the main powerswitch on the powerdistributor. Then clock was again at 1970.01.01 and the Floppies where reset.

Bingo. Seems to be this "on board batterie".

But how to locate and change it. Can I make this myself or has this to be done by a computershop ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0