mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-05 21:27:58 +08:00
Update sqlite dateoffset bug
This commit is contained in:
parent
f12c39259c
commit
104d511d75
@ -60,6 +60,10 @@ namespace SqlSugar
|
|||||||
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (type == UtilConstants.DateTimeOffsetType)
|
||||||
|
{
|
||||||
|
return GetDateTimeOffsetString(value);
|
||||||
|
}
|
||||||
else if (type == UtilConstants.DateType && iswhere)
|
else if (type == UtilConstants.DateType && iswhere)
|
||||||
{
|
{
|
||||||
var parameterName = this.Builder.SqlParameterKeyWord + name + i;
|
var parameterName = this.Builder.SqlParameterKeyWord + name + i;
|
||||||
@ -97,5 +101,15 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private object GetDateTimeOffsetString(object value)
|
||||||
|
{
|
||||||
|
var date = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value);
|
||||||
|
if (date < UtilMethods.GetMinDate(this.Context.CurrentConnectionConfig))
|
||||||
|
{
|
||||||
|
date = UtilMethods.GetMinDate(this.Context.CurrentConnectionConfig);
|
||||||
|
}
|
||||||
|
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff") + "'";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user