Are you able to send data back and forth to the other computer?
If so, then send a request to it telling it to send you it's time.
Client -> SENDDATETIME
Client -> DONE
Server <- DATETIMEIS 2001-06-02 13:15:12 EDT
Server <- DONE
The key is having both sides agree on how they're going to communicate. And after that, have them agree on a data format. It's best to use strings because if you use numeric formats (ints, longs, doubles, etc), it's possible the other computer isn't using an Intel CPU. For example, PowerPC and Sparc CPUS use a different format than Intel chips to represent numbers. Using a string gets around this problem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.