From cc32c318a741f4210561f954c1fd28dcdfbf7feb Mon Sep 17 00:00:00 2001 From: hole-thu Date: Thu, 24 Mar 2022 21:39:40 +0800 Subject: [PATCH] fix migdb.py --- tools/migdb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/migdb.py b/tools/migdb.py index 3b69a08..567be9b 100644 --- a/tools/migdb.py +++ b/tools/migdb.py @@ -27,8 +27,8 @@ def mig_post(): r[3] = r[3] or '' # cw r[4] = r[4] or '' # author_title r[8] = r[8] or r[7] # comment_timestamp - r[7] = datetime.fromtimestamp(r[7]) - r[8] = datetime.fromtimestamp(r[8]) + r[7] = datetime.fromtimestamp(r[7]).astimezone() + r[8] = datetime.fromtimestamp(r[8]).astimezone() r[9] = bool(r[9]) r[10] = bool(r[10] or False) # comment r[12] = bool(r[12]) @@ -82,7 +82,7 @@ def mig_comment(): for r in rs: r = list(r) r[2] = r[2] or '' - r[4] = datetime.fromtimestamp(r[4]) + r[4] = datetime.fromtimestamp(r[4]).astimezone() r[5] = bool(r[5] or False) r.insert(6, searchable[r[6]]) r.insert(3, r[3].startswith('[tmp]\n'))