?
Solved

Checking client machine Date against server Date

Posted on 2003-03-10
6
Medium Priority
?
134 Views
Last Modified: 2010-04-04
How can I check whether or not I have a match between my client machine (system) date and the server (system) date ?

We have seen instances when a client machine has had a different (future) date set [due to testing on a local machine for some reason] and when running Delphi code that makes use of the 'Now'/'Date' calls then inputs misleading date stamps in data on the server.

We're looking for ways to determine whether or not all our dates on machines are in line.
Can this be done ?

Thanks in advance

Steve
 



 
0
Comment
Question by:StevenK
6 Comments
 
LVL 6

Accepted Solution

by:
DaFox earned 90 total points
ID: 8102025
Hi Steve.

To get the time from a server in your network use NetRemoteTOD() from netapi32. You may also take a look at this Delphi (non-vcl) program: http://www.luckie-online.de/cgi-bin/load.cgi?downloads/inet_time.exe

Markus
0
 
LVL 21

Expert Comment

by:ziolko
ID: 8102379
look at: NetRemoteTOD()
increase points and I'll post here some code includeing date synchronization between two machines.
Note: works only on WinNT 4.0 or higher.
ziolko.
0
 

Expert Comment

by:hellspawn_9999
ID: 8103399
Apart from the API functions, you could run a stored procedure against your database server, in case you have one. This would be platform independent.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:StevenK
ID: 8103508
As far as the database server taking control of the date / time element of things - this is kind of a no-go.  :(
We're restricted to the Paradox tables that we adopted (whereas we'd now make use of SQL Server and its time-getting procedures).
Thanks anyway.
Steve
0
 
LVL 3

Expert Comment

by:LukA_YJK
ID: 8125016
Maybe if you have client/server applications, then you can make the clients all send ther Now to the server application at Start. And if anybody has a different Date then server should send its own Date to her... You can do it using TClient/ServerSocket
0
 

Expert Comment

by:CleanupPing
ID: 9316862
StevenK:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question