Fix CREST stuff

This commit is contained in:
blitzmann
2017-11-05 01:28:57 -05:00
parent bd0de82a8e
commit cebca64e5e
4 changed files with 17 additions and 14 deletions

View File

@@ -15,6 +15,7 @@ from gui.display import Display
import gui.globalEvents as GE
from logbook import Logger
import calendar
pyfalog = Logger(__name__)
if 'wxMac' not in wx.PlatformInfo or ('wxMac' in wx.PlatformInfo and wx.VERSION >= (3, 0)):
@@ -112,7 +113,8 @@ class CrestFittings(wx.Frame):
def updateCacheStatus(self, event):
t = time.gmtime(self.cacheTime - time.time())
if t < 0:
if calendar.timegm(t) < 0: # calendar.timegm gets seconds until time given
self.cacheTimer.Stop()
else:
sTime = time.strftime("%H:%M:%S", t)
@@ -222,7 +224,7 @@ class ExportToEve(wx.Frame):
self.mainFrame.Bind(GE.EVT_SSO_LOGIN, self.ssoLogin)
self.Bind(wx.EVT_CLOSE, self.OnClose)
self.SetSizer(hSizer)
self.SetSizer(mainSizer)
self.SetStatusBar(self.statusbar)
self.Layout()

View File

@@ -614,7 +614,7 @@ class MainFrame(wx.Frame):
char = sCrest.implicitCharacter
if char:
t = time.gmtime(char.eve.expires - time.time())
sTime = time.strftime("%H:%M:%S", t if t >= 0 else 0)
sTime = time.strftime("%H:%M:%S", t)
newTitle = "%s | %s - %s" % (self.title, char.name, sTime)
self.SetTitle(newTitle)