Пример #1
0
 def lastlogExit(self):
     starttime = time.strftime('%a %b %d %H:%M',
                               time.localtime(self.logintime))
     endtime = time.strftime('%H:%M', time.localtime(time.time()))
     duration = utils.durationHuman(time.time() - self.logintime)
     utils.addToLastlog('root\tpts/0\t%s\t%s - %s (%s)' % \
         (self.clientIP, starttime, endtime, duration))
Пример #2
0
 def lastlogExit(self):
     starttime = time.strftime('%a %b %d %H:%M',
         time.localtime(self.logintime))
     endtime = time.strftime('%H:%M',
         time.localtime(time.time()))
     duration = utils.durationHuman(time.time() - self.logintime)
     utils.addToLastlog('root\tpts/0\t%s\t%s - %s (%s)' % \
         (self.clientIP, starttime, endtime, duration))