Nairol 0 Posted June 5, 2022 Spoiler With that out of the way...• Type of Bug: Clock, Timezones, Syncing• Description: Server restarts/crashes causes .ph set time to fall out of sync. • Evidence (Chat message/Screenshot): { GameTime = time(nullptr); GameMSTime = getMSTime(); GameTimeSystemPoint = std::chrono::system_clock::now(); GameTimeSteadyPoint = std::chrono::steady_clock::now(); localtime_r(&GameTime, &DateTime); } time_t gt = GameTime::GetGameTime(); const unsigned int time = (gt - (gt % 86400)) + (offset * 60); WorldPackets::Misc::LoginSetTimeSpeed loginSetTimeSpeed; loginSetTimeSpeed.NewSpeed = 0.01666667f; loginSetTimeSpeed.GameTime = time; loginSetTimeSpeed.ServerTime = time; loginSetTimeSpeed.GameTimeHolidayOffset = 0; loginSetTimeSpeed.ServerTimeHolidayOffset = 0; SendDirectMessage(loginSetTimeSpeed.Write()); if (permanent) m_timePermanent = offset; else m_timePermanent = -1; • Steps to reproduce: Can't. Based on Razmataz experience. • Expected result: If I set a time, for example... .ph set (MyTime) After a restart that lasts for 1 minute, and I re-join the phase. Clock should be (MyTime).• Observed result: Observed result tend to be (MyTime)-(Crashtime) • Reproduction rate: 100% in current state. • Additional information: The discussion came up in tandem with me asking Razmataz how difficult it is to add time-zone tags to .ph set. For example, setting my phase's time to follow GMT+/-0 through • .ph set time GMT+0 • .ph set time GMT-0 In tandem with this, Razmataz had an outburst 'Scream'. My suggestion was: 1) Polling script, that pulls time data from an external resource, for example... the Server Computer. 2) Assuming the polled data is a Constant, verify its set Timezone and calculate the rest timezones with addition(+) and substraction(-). 3) Create a tag-list with every timezone, UTC or GMT with the calculations. For example, Timezone.Server = ServerTZ Time.Server = ServerTClock IF 12+(GMT-12) = ServerTZ THEN GMT+1 = ServerTClock ELSE GMT+1 = ServerTZ+1 ServerTClock+(GMT+1) END Horrible attempt at Logic coding but, something like that. At least, it seemed to work in Excel. See below. Spoiler 4) Re-visit .ph set command list, allow phases to tag these timezones. Share this post Link to post Share on other sites
Razmataz 14 Posted June 11, 2022 will completely migrate phase time to this concept tbh. if people want it stuck at a time they can still use the permanent flag. Share this post Link to post Share on other sites
Razmataz 14 Posted July 11, 2022 okay, so .phase set time off - Time progresses in server time as normal. .phase set time HH:MM - Calculate the difference between the specified HH:MM and server time. Anyone who joins your phase receives the same offset. If the server time is 6:00pm and I do .phase set time 15:00, then anyone who joins the phase has their time put to 3 hours before server time. i.e. If they join at 7:00pm, then their time is adjusted to 4:00pm when entering the phase .phase set time HH:MM permanent - Phase always stays at HH:MM time. Will adjust date accordingly, though. Share this post Link to post Share on other sites