Time in no local GameServers

Hi.

I have been having some problems with the time obtained from the server in the PUN client. In the MasterServer and the main GameServer we have the same ServerTimeInMiliseconds since they are obtained from the Environment.Tickcount of the same machine. In this case, we could compare times of some events produced in a room (and stored as CustomRoomProperties) with the time that is obtaining a client being in the lobby watching properties of a room that he is about to enter.

The problem comes when a new GameServer is created due to the load of the main server. The times that manage a Client that is in a room in the new new GameServer are absolutely different from the times in the Lobby.

Is there any way of force the new GameServer's time to be equal to the time of the main server?

Any idea to solve my problem?
Thanks a lot.

Comments

  • first, you should synchronize windows time on both machines quite regularly. once per day for instance
    second, you may introduce special operation, which will provide you server time. next you get server time from lobby and from new GS, and calculate difference between them. then just apply this difference when you check time of your event

    best,
    ilya
  • Thank you for your quick response.

    About the first point of your response. I am talking about a machine launched by LoadBalancing server, a machine that probably will exist just a few hours. Should we change the machine time of the launched gameserver? Maybe provide the MasterServer datetime to the launched GameServer?

    I am not sure if you are referring to server time as tickcount or you are referring to datetimes.
    At the second point, I understand that you are talking about tickcounts. Am i wrong?

    Thanks,
    Jose Luis López
  • @PeP_Bkool

    you are not bound to change time on just created machine. if you like you may do this, if not, than do not this.

    >I am not sure if you are referring to server time as tickcount or you are referring to datetimes.
    At the second point, I understand that you are talking about tickcounts. Am i wrong?

    you may use any time representation convinient for you: ticks, milliseconds , datetime or whatever. trick is same for all this ways

    best,
    ilya