mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
fix(totals.py): end report at current time if a task is being tracked
Fixes #540 Signed-off-by: Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur@gmail.com>
This commit is contained in:
parent
00a2bf55da
commit
75d037d353
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ def calculate_totals(input_stream):
|
|||
report_end = datetime.datetime.strptime(j[-1]["end"], DATEFORMAT).replace(tzinfo=from_zone)
|
||||
else:
|
||||
if report_end_utc is not None:
|
||||
j[-1]["end"] = report_end_utc.strftime(DATEFORMAT)
|
||||
j[-1]["end"] = min(report_end_utc, datetime.datetime.now(tz=from_zone)).strftime(DATEFORMAT)
|
||||
else:
|
||||
j[-1]["end"] = datetime.datetime.now(tz=from_zone).strftime(DATEFORMAT)
|
||||
report_end = datetime.datetime.now(tz=to_zone)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue