我有一个模型课:
def execute_sql(query):
# Handles DB interactions
def get_data_from_past(time_period: str,count: int):
sql_statement = f'call getStuffFromPast({time_period},{count})'
results = execute_sql(sql_statement)
这段代码:
public Inspection
{
public DateTimeOffset InspectionDate { get; set; }
}
如果我设置了一个断点,我会在内存中看到这个值:
哪个是正确的
但是,保存之后,保存在数据库中的值为:
因此将其另存为UTC。为什么?如何避免这种情况并将我看到的值保存在内存中?