mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-05 11:27:41 +08:00
Update 人大金仓[SqlServer]
This commit is contained in:
@@ -73,7 +73,14 @@ namespace SqlSugar
|
|||||||
object value = null;
|
object value = null;
|
||||||
if (it.Value is DateTime)
|
if (it.Value is DateTime)
|
||||||
{
|
{
|
||||||
value = ((DateTime)it.Value).ToString("O");
|
if (IsSqlServerModel())
|
||||||
|
{
|
||||||
|
value = ((DateTime)it.Value).ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = ((DateTime)it.Value).ToString("O");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (it.Value is DateTimeOffset)
|
else if (it.Value is DateTimeOffset)
|
||||||
{
|
{
|
||||||
@@ -98,6 +105,10 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool IsSqlServerModel()
|
||||||
|
{
|
||||||
|
return this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.SqlServer;
|
||||||
|
}
|
||||||
|
|
||||||
public override string FormatDateTimeOffset(object value)
|
public override string FormatDateTimeOffset(object value)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user