mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Fixes timezone offset (#81993)
## About The Pull Request I'm gonna start off by saying I am in EST, which is important to this PR. Ever run a local server while not living in the UK and realizing that time is just frozen for you? Basically, this is why. We have ``GLOB.timezoneOffset`` which basically the time difference between BYOND's default timezone, UTC, and the timezone the server is being hosted in, however when you open a local host you may find that this isn't the case.  This should be 144000 for me (results may vary on your location) because of my timezone   514 did mess a little bit with timezones, adding a new arg in ``time2text``  But it also added a new var, ``world.timezone``, which handles basically everything we want for timezone offset stuff. By default, this is UTC, which is perfect for our case.  So I just swapped out our non-functional ``time2text(0,"hh")`` with ``world.timezone``, and  Incredible! It works! Time is even ticking again!  What an amazing feat, thanks 514! ## Why It's Good For The Game Closes https://github.com/tgstation/tgstation/issues/81180 ## Changelog 🆑 fix: Time on servers hosted outside of the UK should now properly have their timezone offset. /🆑
This commit is contained in:
+1
-1
@@ -119,7 +119,7 @@ GLOBAL_VAR(restart_counter)
|
||||
// From a really fucking old commit (91d7150)
|
||||
// I wanted to move it but I think this needs to be after /world/New is called but before any sleeps?
|
||||
// - Dominion/Cyberboss
|
||||
GLOB.timezoneOffset = text2num(time2text(0,"hh")) * 36000
|
||||
GLOB.timezoneOffset = world.timezone * 36000
|
||||
|
||||
// First possible sleep()
|
||||
InitTgs()
|
||||
|
||||
Reference in New Issue
Block a user