|
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? |
[NomadAU]
|
Post subject: How can I get the server time? |
Post rating: 0
|
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.
|
|
|
|
|
API Support
|
Post subject: Re: How can I get the server time? |
Post rating: 0
|
Posted: Thu 27 Aug, 2009, 12:15
|
|
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
|
|
|
|
|
SFXbernhard
|
Post subject: Re: How can I get the server time? |
Post rating: 0
|
Posted: Mon 04 Apr, 2022, 13:06
|
|
User rating: 21
Joined: Thu 19 May, 2011, 20:50 Posts: 413 Location: Germany, Munich
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|