diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 82b2b903..4362f33a 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -20,6 +20,11 @@ /proc/SQLtime(timevar) return time2text(timevar || world.timeofday, "YYYY-MM-DD hh:mm:ss") +/proc/station_time(display_only = FALSE, wtime=world.time) + return ((((wtime - SSticker.round_start_time) * SSticker.station_time_rate_multiplier) + SSticker.gametime_offset) % 864000) - (display_only? GLOB.timezoneOffset : 0) + +/proc/station_time_timestamp(format = "hh:mm:ss", wtime) + return time2text(station_time(TRUE, wtime), format) GLOBAL_VAR_INIT(midnight_rollovers, 0) GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)