Feature/actr forget (#55)
* [changes]Request to remove 'config_id' has been received. * [add]Add the access history record table * [changes]Request to remove 'config_id' has been received. * [add]Add the access history record table * [add]Obtain the record of the forgetting trend * [changes]Based on the AI's suggestion, make the necessary modifications.
This commit is contained in:
@@ -37,12 +37,20 @@ def parse_historical_datetime(v):
|
||||
此函数手动解析 ISO 8601 格式的日期字符串,支持1-4位年份
|
||||
|
||||
Args:
|
||||
v: 日期值(可以是 None、datetime 对象或字符串)
|
||||
v: 日期值(可以是 None、datetime 对象、Neo4j DateTime 对象或字符串)
|
||||
|
||||
Returns:
|
||||
datetime 对象或 None
|
||||
"""
|
||||
if v is None or isinstance(v, datetime):
|
||||
if v is None:
|
||||
return v
|
||||
|
||||
# 处理 Neo4j DateTime 对象
|
||||
if hasattr(v, 'to_native'):
|
||||
return v.to_native()
|
||||
|
||||
# 处理 Python datetime 对象
|
||||
if isinstance(v, datetime):
|
||||
return v
|
||||
|
||||
if isinstance(v, str):
|
||||
|
||||
Reference in New Issue
Block a user