def timestamp_local(value):
    'Filter to convert given timestamp to local date/time.'
    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.
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