Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/taskdog-ui/src/taskdog/cli/commands/audit/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ def _parse_date_filter(date_str: str, end_of_day: bool = False) -> datetime:
Parsed datetime object
"""
try:
return datetime.fromisoformat(date_str)
dt = datetime.fromisoformat(date_str)
if end_of_day and len(date_str.strip()) <= 10 and dt.time() == datetime.min.time():
return dt.replace(hour=23, minute=59, second=59, microsecond=999999)
return dt
except ValueError:
suffix = "T23:59:59" if end_of_day else "T00:00:00"
suffix = "T23:59:59.999999" if end_of_day else "T00:00:00"
return datetime.fromisoformat(f"{date_str}{suffix}")


Expand Down