def test_offset_with_format(environment) -> None:
    """Verify that offset works together with datetime format."""
    environment.datetime_format = '%d %b %Y %H:%M:%S'

    template = environment.from_string(
        "{% now 'utc' - 'days=2,minutes=33,seconds=1', '%d %b %Y %H:%M:%S' %}"
    )

    assert template.render() == "07 Dec 2015 23:00:00"
Verify that offset works together with datetime format.
tests/test_time_extension.py