Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
How can I get the server time? http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=700 |
Page 1 of 1 |
Author: | [NomadAU] [ Wed 26 Aug, 2009, 23:59 ] |
Post subject: | How can I get the server time? |
What class in the API do I use to determine the server time? I've looked around through the most obvious ones (IEngine, IContext) but can't see any method that will return the time the server is running on. |
Author: | API Support [ Thu 27 Aug, 2009, 12:15 ] |
Post subject: | Re: How can I get the server time? |
You can use ITick.getTime just after you receive new tick. If there is no any delays in execution, then it will be quite precise. If you have correct time on your local machine (with internet synchronization), then you can use System.currentTimeMillis() which returns current GMT time |
Author: | SFXbernhard [ Mon 04 Apr, 2022, 13:06 ] |
Post subject: | Re: How can I get the server time? |
There is a new function in the API, that does the job https://www.dukascopy.com/client/javado ... #getTime-- |
Page 1 of 1 |