The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How to get the Server Time?

SunnyCat
2017-03-19 08:28:50

I need the sever time.But i cant know how to get it.

Comments

[Deleted User]
2017-03-20 09:15:11

Hi @SunnyCat,

by server time you mean the actual time or a time stamp? I guess getting the actual time is not possible. Getting an up to date server time stamp is possible by calling PhotonNetwork.FetchServerTimestamp();. Afterwards you can access this time stamp by using PhotonNetwork.ServerTimestamp. For more information please take a look at the API page.

Back to top