Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How can I get the server time?
 Post subject: How can I get the server time? Post rating: 0   New post Posted: Wed 26 Aug, 2009, 23:59 

User rating: 0
Joined: Wed 26 Aug, 2009, 05:28
Posts: 3
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.


 
 Post subject: Re: How can I get the server time? Post rating: 0   New post Posted: Thu 27 Aug, 2009, 12:15 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
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


 
 Post subject: Re: How can I get the server time? Post rating: 0   New post Posted: Mon 04 Apr, 2022, 13:06 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
There is a new function in the API, that does the job
https://www.dukascopy.com/client/javado ... #getTime--


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com