mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
correct timezone adjustment
This commit is contained in:
parent
17ce03791b
commit
5812050104
@ -2,6 +2,7 @@
|
|||||||
for the programmer/user"""
|
for the programmer/user"""
|
||||||
|
|
||||||
from LoggerGlobal import *
|
from LoggerGlobal import *
|
||||||
|
import PythonUtil
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class Notifier:
|
class Notifier:
|
||||||
@ -34,7 +35,7 @@ class Notifier:
|
|||||||
of day, and also switches into the server's timezone.
|
of day, and also switches into the server's timezone.
|
||||||
"""
|
"""
|
||||||
delta = int(round(delta))
|
delta = int(round(delta))
|
||||||
Notifier.serverDelta = delta + timezone - time.timezone
|
Notifier.serverDelta = delta + time.timezone - timezone
|
||||||
|
|
||||||
import NotifyCategory
|
import NotifyCategory
|
||||||
# Temporary try .. except for old Panda.
|
# Temporary try .. except for old Panda.
|
||||||
@ -43,7 +44,7 @@ class Notifier:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.info("Notify clock adjusted by %s seconds (and timezone adjusted by %s hours) to synchronize with server." % (delta, (timezone - time.timezone) / 3600))
|
self.info("Notify clock adjusted by %s (and timezone adjusted by %s hours) to synchronize with server." % (PythonUtil.formatElapsedSeconds(delta), (time.timezone - timezone) / 3600))
|
||||||
|
|
||||||
def getTime(self):
|
def getTime(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user