mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Further time fixes
This commit is contained in:
@@ -46,7 +46,7 @@ var/next_station_date_change = 1 DAY
|
||||
#define station_time_in_ds (GLOB.roundstart_hour HOURS + round_duration_in_ds)
|
||||
|
||||
/proc/stationtime2text()
|
||||
return time2text(station_time_in_ds, "hh:mm") //For some reason, this is not accurate. It's expecting some other kind of times, maybe? Like ones from world.realtime?
|
||||
return time2text(station_time_in_ds + GLOB.timezoneOffset, "hh:mm")
|
||||
|
||||
/proc/stationdate2text()
|
||||
var/update_time = FALSE
|
||||
@@ -65,6 +65,13 @@ var/next_station_date_change = 1 DAY
|
||||
var/time_portion = time2text(world.timeofday, "hh:mm:ss")
|
||||
return "[date_portion]T[time_portion]"
|
||||
|
||||
/proc/get_timezone_offset()
|
||||
var/midnight_gmt_here = text2num(time2text(0,"hh")) * 36000
|
||||
if(midnight_gmt_here > 12 HOURS)
|
||||
return 24 HOURS - midnight_gmt_here
|
||||
else
|
||||
return midnight_gmt_here
|
||||
|
||||
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
|
||||
if(!wtime)
|
||||
wtime = world.time
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
// if(config && config.log_runtime)
|
||||
// log = file("data/logs/runtime/[time2text(world.realtime,"YYYY-MM-DD-(hh-mm-ss)")]-runtime.log")
|
||||
|
||||
GLOB.timezoneOffset = text2num(time2text(0,"hh")) * 36000
|
||||
GLOB.timezoneOffset = get_timezone_offset()
|
||||
|
||||
callHook("startup")
|
||||
init_vchat()
|
||||
|
||||
Reference in New Issue
Block a user