Skip to content

Commit

Permalink
fix no timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Light-Beacon committed Aug 28, 2024
1 parent 6f0821a commit 1ae0a92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Plugin/ProjectInfo/Modules/GitInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ def get_card_last_update_time(_,card):
if not file:
return
timestamp = subprocess.check_output(r"git log -1 --format=%ct --follow -- " + file.abs_path ,cwd=file.direname, shell=True).decode("utf-8")
if len(timestamp) == 0:
return
dt = datetime.datetime.fromtimestamp(int(timestamp[:-1]))
card['last_update'] = dt.date()

0 comments on commit 1ae0a92

Please sign in to comment.