def timestamp_local(value):
 try:
  return dt_util.as_local(dt_util.utc_from_timestamp(value)).strftime(DATE_STR_FORMAT)
 except (ValueError, TypeError):
  return value

def timestamp_local ( value ) : try : return dt_util . as_local ( dt_util . utc_from_timestamp ( value ) ) . strftime ( DATE_STR_FORMAT ) except ( ValueError , TypeError ) : return value
filter to convert given timestamp to local date/time .