def upload_program (self, program):
    if not program.get('clock', None) or 'offset' not in program:
      print "Bad input"
      raise Exception("Bad input, missing clock definition: {0}".format(program.get('clock')))
    result = self.dexcom.WriteDisplayTimeOffset(offset=program['offset'])
    new_offset = self.dexcom.ReadDisplayTimeOffset( )
    return dict(requested=dict(**program), result=result, offset=new_offset.total_seconds( ))
dataset/ETHPy150Open openaps/openaps/openaps/vendors/dexcom.py/UpdateTime.upload_program/original