The time2text proc seems to no longer handle offsets properly in byond 515.1633.
When calling the proc with a negative offset, it only returns something like 00:59:59, seemingly depending on offset.
calling the proc without the offset in both cases (514 and 515) starts with 01:00:00. So the offset is needed to get the time to 00:00:00
Example call without offset: Wed Mar 13 01:00:03 2024
Numbered Steps to Reproduce Problem:
create the proc beneath.
Define an offset like 36000 for the timezoneOffset (-1 hour)
call the proc beneath
Seemingly the proc can't handle the negative numbers anymore because to get beneath the first hour, the wtime - offset is < 0?
Code Snippet (if applicable) to Reproduce Problem:
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
if(!wtime)
wtime = world.time
return time2text(wtime - GLOB.timezoneOffset, format)
Expected Results:
Like in byond 514: 00:00:0x when called right at round start
Actual Results:
00:59:59
Full result when using a negative offset: Sat Jan 01 00:59:59 2000
Does the problem occur:
Every time? Or how often? every time
In other games? only tested ss13
In other user accounts? yes, server side
On other computers? yes, server side
When does the problem NOT occur?
Rolling back to 514.1589
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Worked fine in 514.1589
Workarounds:
</0>
On 514.1589:
https://i.imgur.com/YfJVz3M.png
On 515.1633:
https://i.imgur.com/N2N8VjQ.png
Though I will note we have not noticed any issues with clocks on our live server which is using basically the same code, but it is hosted on linux so this bug may be exclusive to windows.