code: def unix_time(self, dt):
          
          epoch = datetime.utcfromtimestamp(0)
          delta = dt - epoch
          return int(delta.total_seconds())
docs: Returns the number of seconds since the UNIX epoch for the given
          datetime (dt).
  
          PARAMETERS:
          dt -- datetime