HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Interesting Time find  (Read 720 times)

Thazager

  • General Accounts
  • *
  • Posts: 1129
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Interesting Time find
« on: Mar 20, 17, 09:44:45 PM »

This might have been found before, and I made a test to see it happen.

When a server function sends a datetime value to the client, the time gets changed in the sending.

Code: [Select]
//server side - called from client side to test

untrusted function CheckTime()
  account as ID = SYSTEM.REMOTE.client

  test as DateTime = "03/20/2017 21:17:29"            // random date time, but a number to check against
  call client account TestClassMethods:TestTime(test)
.

// client side - called by server - TestClassMethods

// clicking on buttons
method onMouseClick(args references Class GUIMouseEvent)
  target as NodeRef of Class GUIControl = args.source

  when target.name
    is "testButton"
       call server CheckTime()
    .
  .
.

remote function TestTime(test as datetime)
  println("test "+test)
.


This value prints out as test 03/20/2017 16:17:29 which is 5 hours difference from server to client. I am not checking for local or server time, I am just sending a value which gets Automatically changed.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1129
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Interesting Time find
« Reply #1 on: Mar 20, 17, 09:51:45 PM »

The problem comes in when the datetime value is part of a class and sent with that class to the client. All datetime values in the class list are now changed by 5 hours (but if you live in a diff location it will be a diff value).

MissionInfo as class
missionTime as field

MissionInfo.missionTime has been changed.

MissionList as list of class MissionInfo having a list of missions and their times, and all missions times are changed.
Logged

Penanito

  • General Accounts
  • *
  • Posts: 3
    • View Profile
Re: Interesting Time find
« Reply #2 on: Mar 20, 17, 10:46:11 PM »

Yep, getting 03/20/2017 15:17:29 here XP

(Mountain Time)
Logged

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: Interesting Time find
« Reply #3 on: Mar 21, 17, 12:59:50 PM »

iirc there was an update to client timers a while ago that kind of addressed this issue.

iirc again it was separated so you could find both the actual local OS time, local game client time, and server time.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1405
    • View Profile
    • Forever Interactive, Inc.
Re: Interesting Time find
« Reply #4 on: Mar 21, 17, 03:01:47 PM »

Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.