?
Solved

Checking client machine Date against server Date

Posted on 2003-03-10
6
Medium Priority
?
133 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month8 days, 20 hours left to enroll

764 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