Skip to content

Commit 4a363e4

Browse files
refactor: add time to rp end date in summary items
1 parent b38d430 commit 4a363e4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/dve/reporting/excel_report.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from collections.abc import Iterable
55
from dataclasses import dataclass, field
6+
from datetime import datetime, timedelta
67
from io import BytesIO
78
from itertools import chain
89
from typing import Any, Optional, Union
@@ -136,7 +137,18 @@ def _add_submission_info(self, status: str, summary: Worksheet):
136137
summary.append(["", "Status", status])
137138

138139
for key, value in self.summary_dict.items():
140+
<<<<<<< Updated upstream
139141
summary.append(["", key, str(value)])
142+
=======
143+
if key == "Reporting Period End":
144+
_rp_end_value = datetime.strptime(value, "%Y-%m-%d %H:%M:%S")
145+
value = (
146+
_rp_end_value
147+
if _rp_end_value.hour != 0 \
148+
else _rp_end_value + timedelta(hours=23, minutes=59, seconds=59)
149+
)
150+
summary.append(["", _key_renames.get(key, key), str(value)])
151+
>>>>>>> Stashed changes
140152

141153
summary.append(["", ""])
142154

0 commit comments

Comments
 (0)