473,791 Members | 3,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

O.T. - trying to sync w/ nist time server...

MLH
I have database apps that depend on accurate time
settings on the system clock. Fancy that, huh? Well,
am trying to sync w/ the gvt's nist time server. From
a CMD window in Win XP, I type the following:

C:\DB\TimNall>G onna set time wrong - say to 8AM

C:\DB\TimNall>t ime
The current time is: 12:07:12.80
Enter the new time: 8:00:00

C:\DB\TimNall>t ime
The current time is: 8:00:02.20
Enter the new time:

C:\DB\TimNall>n et time /setsntp:time.ni st.gov
The command completed successfully.
C:\DB\TimNall>t ime /t
08:00 AM
Ideas anyone? Whatever way you suggest, I will need
to call it from within A97 - probably from a VBA procedure.

Nov 13 '05 #1
8 5389
MLH
Oops...
First post was missing a few lines...

C:\DB\TimNall>n et time /set
Could not locate a time-server.

More help is available by typing NET HELPMSG 3912.

The net time /set command is what's failing for me.
Nov 13 '05 #2
The SHELL function allows you to execute a command from within VBA. All you
now have to do is determine how to enter both "/set" and the time to which
you want the clock set on a command line, rather than supplying the time in
response to a prompt. I'd guess there is a way to do so, but wouldn't offer
a "warranty".

Larry Linson
Microsoft Access MVP

"MLH" <CR**@NorthStat e.net> wrote in message
news:4q******** *************** *********@4ax.c om...
Oops...
First post was missing a few lines...

C:\DB\TimNall>n et time /set
Could not locate a time-server.

More help is available by typing NET HELPMSG 3912.

The net time /set command is what's failing for me.

Nov 13 '05 #3
MLH wrote:
I have database apps that depend on accurate time
settings on the system clock. Fancy that, huh? Well,
am trying to sync w/ the gvt's nist time server. From
a CMD window in Win XP, I type the following:

C:\DB\TimNall>G onna set time wrong - say to 8AM

C:\DB\TimNall>t ime
The current time is: 12:07:12.80
Enter the new time: 8:00:00

C:\DB\TimNall>t ime
The current time is: 8:00:02.20
Enter the new time:

C:\DB\TimNall>n et time /setsntp:time.ni st.gov
The command completed successfully.
C:\DB\TimNall>t ime /t
08:00 AM
Ideas anyone? Whatever way you suggest, I will need
to call it from within A97 - probably from a VBA procedure.

I remember, in the cobwebs of my mind somewhere, you could pass
something in and out in DOS. Syntax like
Time <y.Txt >T.Txt
where Y.Txt has the input and T is the output.
Nov 13 '05 #4
MLH <CR**@NorthStat e.net> wrote in
news:4q******** *************** *********@4ax.c om:
Oops...
First post was missing a few lines...

C:\DB\TimNall>n et time /set
Could not locate a time-server.

More help is available by typing NET HELPMSG 3912.

The net time /set command is what's failing for me.


I don't understand what you're asking.

Your first question looked like you wanted to set time by a
recognized time server, and that it wasn't working. I tried it, and
it doesn't work for me, either.

This new post looks like a completely different question.

Have you gone through the steps in this article:

http://msdn.microsoft.com/library/de...l=/library/en-
us/dnw2
kmag01/html/TimeWin2K.asp

I can't seem to get it to work on my computer either, but the
">w32tm -once" command seems to work, though it may be that it only
worked after I ran your first command. That is, it appears that the
/setsntp switch only sets which time server is used, which you can
check by running "net time /querysntp". If you run:

net time /setsntp:tick.us no.navy.mil

and then check "net time /querysntp", it will return
tick.usno.navy. mil. If you then run:

net time /setsntp:time.ni st.gov

and then check "net time /querysntp", it returns time.nist.gov.

Now, if you run one of those /setsntp commands and then run
"w32tm -once" it appears to me that it sets the time, as long as
your firewall lets you through to the remote time server.

You should be able to script this and use SHELL to execute it.
You'll probably want to direct the output of w32tm to NUL, though.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5
MLH
I don't understand what you're asking.

Your first question looked like you wanted to set time by a
recognized time server, and that it wasn't working. I tried it, and
it doesn't work for me, either. Sorry about that. First 'n second post in thread were really
supposed to be ONE post. What I left off the first was the
time /set command in CMD window. That one doesn't seem
to be working either.
Have you gone through the steps in this article:

http://msdn.microsoft.com/library/de...l=/library/en-
us/dnw2
kmag01/html/TimeWin2K.asp

Am about to now...
Nov 13 '05 #6
MLH
http://msdn.microsoft.com/library/de...l=/library/en-
us/dnw2kmag01/html/TimeWin2K.asp

Very helpful info there, yes. But I'm on XP, so some syntax change
was required. Ultimately successful. Thx. Here's screens of commands
processed...

C:\DB\Ajuda>tim e
The current time is: 10:54:01.39
Enter the new time: 8:00:00.00

C:\DB\Ajuda>tim e
The current time is: 8:00:01.04
Enter the new time:

C:\DB\Ajuda>w32 tm /resync
Sending resync command to local computer...
The command completed successfully.

C:\DB\Ajuda>tim e
The current time is: 10:56:10.14
Enter the new time:

C:\DB\Ajuda>
Nov 13 '05 #7
Salad wrote:
I remember, in the cobwebs of my mind somewhere, you could pass
something in and out in DOS. Syntax like
Time <y.Txt >T.Txt
where Y.Txt has the input and T is the output.


Or pipe it:
c:\>echo.|time

displays time (note no space between "echo" and ".")

Also:
c:\>net time \\%COMPUTERNAME %|find "Current"

The pipe isn't necessary there but does suppress the exra CRLF and "The
command completed successfully"

You can suppress the prompt on the first syntax too with:
c:\>echo.|time| find "current"

to set the time:
c:\>echo 09:00:00|time
Nov 13 '05 #8
Trevor Best wrote:
Salad wrote:
I remember, in the cobwebs of my mind somewhere, you could pass
something in and out in DOS. Syntax like
Time <y.Txt >T.Txt
where Y.Txt has the input and T is the output.

Or pipe it:
c:\>echo.|time

displays time (note no space between "echo" and ".")

Also:
c:\>net time \\%COMPUTERNAME %|find "Current"

The pipe isn't necessary there but does suppress the exra CRLF and "The
command completed successfully"

You can suppress the prompt on the first syntax too with:
c:\>echo.|time| find "current"

to set the time:
c:\>echo 09:00:00|time


Damn. Reminds me of the good times in DOS when developers were
developers and fancy WYSIWYG was just germanating in the minds of others.
Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1235
by: Charles Krug | last post by:
List: I'm playing with some image algorithms and one of the examples discusses fingerprint comparison. The NIST has fingerprint sample files for download, in NIST IHead format. Has anyone built a reader for that format? Thanks
0
1357
by: Ahmed Shinwari | last post by:
Hello Charles, I am Ahmed, I read your query regarding image reader for NIST's ihead standard. You mentioned that NIST has a sample database of such images for downloading, could please do me a favour, (i) forward me the link of NIST where sample data of ihead image is stored, I can not find it.
1
5353
by: Rob F. | last post by:
I have tried to set up log shipping for one of our databases - first time. Using EM I was able to create the job and maintenance plan sucessfully. I wasn't able to find any errors in any logs. In the monitor server, when I look at job history, everything is getting copied and loaded sucessfully, yet the STATUS in the log shipping monitor states it is out of sync. How do I get this into sync? I have set the out of sync threshold to...
4
1428
by: someguy | last post by:
Hi, We are going to be running two SQL Server 2000's from the same physical server, with Windows Server 2003, and I need to have certain tables between them syncronized. Database A is a backend to a website and database B is going to be used by a different department. Both the databases have certain data in common but it isn't stored in the same format. I can't just auto sync one with the other, the data (records) has to be...
2
6237
by: Chris | last post by:
I have been attacked again by a dreaded feature creep. My software needs to update the PC time w/ some internet based time clock. Anyone know of a site that you can request the current time of? Any one have sample code of doing this? Thanks for any ideas. Chris
7
9708
by: Ole | last post by:
Hi, I'm going to develop a socket communication between an instrument (running CE 5.0 with Compact Fraework V2) and a PC. As the instrument should only connect to one PC at a time I believe that the sync version of the socket should be the easiest - or what??? (please tell if I'm wrong). Are there anyone who is able to point to a Server and Client example code in C# VS2005 (I've only been able to find a C++ version) ???
1
2053
by: Sebastian Becker | last post by:
Hi, I'd like to show whether a business is open or not depending on the opening times and the real time of the time zone of the business (not the server or PC time). My idea is to have a JavaScript clock corrected/synchronized with NIST time on page load (or in regular intervals). Should not be too complicated and I've already begun coding. Trouble might start when summer and winter time must be taken into account. How can I realize...
4
8267
by: DanielGifford | last post by:
Hi- I'm trying to transfer files directly to a PDA via a Csharp program I'm writing. Does anyone know how to do this (I obviously can't use active sync). Ohh yes, I'm running Vista. -Thanks
0
1567
by: info | last post by:
Cognaxon has released "NIST (ANSI/NIST-ITL 1-2000) library" which adds the power of NIST (ANSI/NIST-ITL 1-2000) file format to your software projects using only a few lines of code. Additionally "NIST (ANSI/NIST-ITL 1-2000) library" has built-in support for decompressing fingerprint images from WSQ image format. The advantage of NIST files is the ability to contain multiple images and other types of data about the person in one single...
0
10419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10147
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9023
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.