Skip to content

Commit

Permalink
fix: 修复时间打印错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Vespa314 committed Jul 29, 2023
1 parent f02b5de commit 1bfc1c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Common/CTime.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __str__(self):
return f"{self.year:04}/{self.month:02}/{self.day:02} {self.hour:02}:{self.minute:02}"

def to_str(self):
if self.hour == 0:
if self.hour == 0 and self.minute == 0:
return f"{self.year:04}/{self.month:02}/{self.day:02}"
else:
return f"{self.year:04}/{self.month:02}/{self.day:02} {self.hour:02}:{self.minute:02}"
Expand Down

0 comments on commit 1bfc1c4

Please sign in to comment.