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:
@@ -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'])
|
||||
|
||||
|
Reference in New Issue
Block a user