예제 #1
0
 def get_event_timestamp(self,timetype=0):
     try:
         _time = tools.DecodeDate(self.get(55)[0])
         if timetype == 0:
             return datetime.datetime.fromtimestamp(_time).strftime("%Y-%m-%d %H:%M:%S")
         else:
             return datetime.datetime.fromtimestamp(_time-(8*3600)).strftime("%Y-%m-%d %H:%M:%S")
     except:
         return None
예제 #2
0
 def testDateDecoding(self):
     self.assertEqual(tools.DecodeDate(six.b('\x01\x02\x03\x04')),
                      0x01020304)