code: def format_z(cls, offset):
          
          sec = offset.total_seconds()
          return '{s}{h:02d}{m:02d}'.format(s='-' if sec<0 else '+', h=abs(int(sec/3600)), m=int((sec%3600)/60))
docs: Format `timedelta` into %z