Esempio n. 1
0
 def __needShowTechTreeIntro(self, settings):
     isShowed = settings[GuiSettingsBehavior.TECHTREE_INTRO_SHOWED]
     startTime = datetime.date(GUI_SETTINGS.techTreeIntroStartDate.get('year'), GUI_SETTINGS.techTreeIntroStartDate.get('month'), GUI_SETTINGS.techTreeIntroStartDate.get('day'))
     endTime = startTime + datetime.timedelta(seconds=time_utils.ONE_YEAR)
     registrationTime = self._itemsCache.items.getAccountDossier().getGlobalStats().getCreationTime()
     isOverdue = time_utils.getCurrentLocalServerTimestamp() >= time_utils.getTimestampFromLocal(endTime.timetuple())
     isNewPlayer = registrationTime >= time_utils.getTimestampFromLocal(startTime.timetuple())
     return not (isShowed or isOverdue or isNewPlayer)
Esempio n. 2
0
 def _convertUTCStructToLocalTimestamp(self, val):
     val = time_utils.utcToLocalDatetime(val).timetuple()
     return time_utils.getTimestampFromLocal(val)