The world:GetTimeOfDay() result can grow out of sync when in the editor.
How do you cause this bug?
Set the Day Length to 1 minute in the world properties
Install the World Time Bug package
Drag the Bug folder onto the User template
Preview the game normally, wait a few seconds, then stop the preview
On the top right of the editor, click the cog, then select “Preview on a new server”
Preview the game, wait a few seconds
Repeat steps 3 through 5 as many times as necessary to reproduce the problem
Please note: as far as I can tell, this is only happening on the new server. You won’t see it without the “Preview on a new server” checked, however I’m also pretty sure you need to preview normally at least once to see it.
Game seen in (including “Hub” or “Editor for XYZ”): Editor
How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): Once you get it breaking, it’ll just keep breaking until you nuke the server
Time + date seen: November 7th 2021
Version number (found in Help tab in Settings): 0.d5.9.111485
Hi Cereal, I have tried this around 6 times and cannot get this to reproduce. Can you confirm the rough amount of reproduction attempts you had? This is more that I want to be accurate so enough attempts are made.
I recorded a video of reproducing it - Like you said, just previewing didn’t trigger it, however after changing some code and previewing on the new server, I witnessed the difference again.
@StuartF Little bit of extra info for you to add to your report.
If you turn on “Editor Rendering Setting Override” in the world tab, then preview the game the server GetTimeOfDay will report the correct time, but the local/client times will remain static.
Now we can see that the event has seemingly ended at 14:31 - 29 “minutes” early.
This is because the widget display is local, but the event management is server side.
This was occurring for me, as I was the first one to join the server.
You can also see the dance floor in both of those pictures, which is also de-synced. That floor exists on the server, walking over it on the client causes havoc (teleportation, stuttering).
–
We fixed the first issue by adding a schedule that sent the server time to every client, and the client set their local startTime to that time.
We fixed the floor desync by adding an artificial 15 second delay on server init before animating.
I’m tried previewing a new server again, and still not reproduced this on the copy I took. Does this also happen on the published version if I was to create a new server? i.e. Play the game when there is no server live with it on.
If you pulled down Crayta Cruiselines, you’re going to want to disable the schedule timeFixControllerScript (or fixTimeControllerScript, don’t remember the name).
Yes, you could see it when previewing on a new server, though I’m not sure if it happened on the first preview, or if it was restricted to subsequent previews.
Regardless, we first saw it when previewing on a new server in the editor in Crayta Cruiselines. We thought it was an editor issue until we published it and saw it live - hence the bandaid.
I have disabled that script and now I think I am having it happen, I had a pizza cooking event active while being told it was about to start in X minutes.