SetTime function has odd behavior when passing minutes > "module minutes/hour" setting
|Classification:||Public Item||Due date:|
|Found In Version:||Public Bug Reports - Next Update||Category:||Scripting|
The documentation for SetTime seems like you can set the in-game time to any arbitrary time between 00:00:00.000 and 23:59:59.999.
However, actually trying to set the in-game time (only once, during module startup) to 13:34 (for example) has very odd effects.
The function treats the minutes like they are bound by the minutes/per hour setting of the module. So, for example, if the minutes/per hour of the module is set to "4" and you try to set the time to 00:05 (5 minutes after midnight), it'll actually set the time to 1:00 (1 AM).
The net effect is that you can set the time to 1:03, 15:03 or 22:03, but not 1:30 or 15:45, etc.
It seems like there's some erroneous code in the SetTime function that's rolling over the minutes based on the hours/minute setting where it should be just scaling the hours and minutes given to set the in-game clock. It shouldn't be an unreasonable expectation to set the clock to anything between 00:00 and 23:59 (and certainly the game clock has no problems attaining that range of values during normal module operation).
#3 Updated by Bill Harper 7 months ago
- Status changed from New to Submitted
Internal Report #40476
Hi, thanks for the report! I gave this a look, and there is definitely something going wrong with the function (it appeared even worse to me than you had suggested). So I've advanced the matter for our programmers to analyze, and as soon as they figure out what is going wrong we'll get it into the next available build.