Skip to content

Commit

Permalink
Fixes round and station time. (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
CRITAWAKETS authored Mar 10, 2024
1 parent ae82995 commit ec83688
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/__HELPERS/time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
if(!wtime)
wtime = world.time
return time2text(wtime - GLOB.timezoneOffset, format)
return time2text(wtime, format, 0)

/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)
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)
if(!wtime)
wtime = world.time
return time2text(station_time(TRUE, wtime), format, 0)

/proc/station_time_debug(force_set)
if(isnum(force_set))
Expand Down

0 comments on commit ec83688

Please sign in to comment.