mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
Fixed datetime convertion error in windows.
This commit is contained in:
@@ -160,7 +160,8 @@ def translate_seahub_time(value):
|
|||||||
val_ts = value
|
val_ts = value
|
||||||
val = datetime.fromtimestamp(val_ts) # convert timestamp to datetime
|
val = datetime.fromtimestamp(val_ts) # convert timestamp to datetime
|
||||||
elif isinstance(value, datetime):
|
elif isinstance(value, datetime):
|
||||||
val_ts = int(value.strftime("%s"))
|
# FIXME: convert datetime to timestamp may cause problem, need a better way.
|
||||||
|
val_ts = int(time.mktime(value.timetuple()))
|
||||||
val = value
|
val = value
|
||||||
else:
|
else:
|
||||||
return value
|
return value
|
||||||
|
Reference in New Issue
Block a user