Skip to content

Commit 790d264

Browse files
committed
fix crash when timestamp is 13 digits on python2.7
1 parent 6cb0b26 commit 790d264

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

geeknote/out.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ def rawInput(message, isPass=False):
239239

240240

241241
def printDate(timestamp):
242+
243+
if len(str(timestamp)) == 13:
244+
timestamp = int(str(timestamp)[0:-3])
245+
242246
return time.strftime("%d.%m.%Y", time.localtime(timestamp / 1000))
243247

244248

0 commit comments

Comments
 (0)