diff --git a/tests/test_output.py b/tests/test_output.py index 076444b..ecd73d8 100644 --- a/tests/test_output.py +++ b/tests/test_output.py @@ -45,4 +45,4 @@ def test_generate_forecast_text_file(): END/ """ assert content == expected_content - assert filename == "FLCN39_CWVR_191400.txt" + assert filename == "FLCN39_CWVR_2024-11-19.txt" diff --git a/utils/output.py b/utils/output.py index 37513ae..e25ffb6 100644 --- a/utils/output.py +++ b/utils/output.py @@ -95,7 +95,7 @@ def _generate_report_text(forecast_data: dict[str, dict[str, float]]) -> tuple[s full_date = now.strftime("%A %-d %B %Y").upper() short_date = now.strftime("%-d-%B-%Y").upper() report_data = _get_report_data(forecast_data) - filename = f"FLCN39_CWVR_{day_of_month}{time_of_issue_utc}.txt" + filename = f"FLCN39_CWVR_{now.strftime('%Y-%m-%d')}.txt" output = f"""FLCN39 CWVR {day_of_month}{time_of_issue_utc} SMOKE CONTROL FORECAST FOR THE BC AND YUKON ISSUED BY ENVIRONMENT CANADA AT 7:00 AM {dst}