code: def __encode_time(self, t):
          
          # formula taken from zkemsdk.c - EncodeTime
          # can also be found in the technical manual
          d = (
              ((t.year % 100) * 12 * 31 + ((t.month - 1) * 31) + t.day - 1) *
              (24 * 60 * 60) + (t.hour * 60 + t.minute) * 60 + t.second
          )
          return d
docs: Encode a timestamp so that it can be read on the timeclock