1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 07:01:12 +00:00

[api2] Fix issue in python 2.6 when calling events

This commit is contained in:
zhengxie
2014-10-31 16:40:10 +08:00
parent 8a10cd152d
commit b51d64d8e7

View File

@@ -2538,7 +2538,8 @@ class EventsView(APIView):
epoch = datetime.datetime(1970, 1, 1)
local = utc_to_local(e.timestamp)
d['time'] = (local - epoch).total_seconds()
time_diff = local - epoch
d['time'] = time_diff.seconds + (time_diff.days * 24 * 3600)
d['nick'] = email2nickname(d['author'])