Commit 1293ae81 authored by 段英荣's avatar 段英荣

modify

parent 37ab9426
......@@ -30,10 +30,17 @@ class TopicTransfer(object):
create_time = instance.create_time
print("id is:%d,create_time is:%sm,tzinfo:%s" % (res["id"],str(create_time),str(create_time.tzinfo)))
res["create_time"] = tzlc(create_time)
if create_time.tzinfo is None:
res["create_time"] = tzlc(create_time)
else:
res["create_time"] = create_time.replace(microsecond=0)
update_time = instance.update_time
res["update_time"] = tzlc(update_time)
if update_time.tzinfo is None:
res["update_time"] = tzlc(update_time)
else:
res["update_time"] = update_time.replace(microsecond=0)
return res
except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment