Steps to reproduce
Create a new world with beta APIs enabled, and add the attached behaviour pack to the world.
Enter the world.
Notice that the time reported in chat matches the daytime instead of the absolute (game) time:
Locking the day-night cycle pauses the time reported in chat.
Setting the daytime with
/time set <amount: int>changes the time reported in chat. This value can even be negative.
Expected behaviour
Calling world.getAbsoluteTime() returns the time since the start of the world, as specified by the script API documentation:
getAbsoluteTime(): numberReturns the absolute time since the start of the world.
According to the documentation, the time returned should be equal to the time given by running /time query gametime.
Actual behaviour
The time returned is instead the daytime, and matches the output of /time query daytime.
Notes
I do not know how long this bug has existed for.
Thank you for helping us improve Minecraft! We saved your files: