def pretty_ts(timestamp, tz=True):
 dt = timestamp
 if (not isinstance(timestamp, datetime.datetime)):
  dt = ts_to_dt(timestamp)
 if tz:
  dt = dt.astimezone(dateutil.tz.tzlocal())
 return dt.strftime('%Y-%m-%d %H:%M %Z')

def pretty_ts ( timestamp , tz = True ) : dt = timestamp if ( not isinstance ( timestamp , datetime . datetime ) ) : dt = ts_to_dt ( timestamp ) if tz : dt = dt . astimezone ( dateutil . tz . tzlocal ( ) ) return dt . strftime ( '%Y-%m-%d %H:%M %Z' )
pretty-format the given timestamp .