Update datetimeoffset pgsql

This commit is contained in:
sunkaixuan
2023-02-26 12:19:59 +08:00
parent fcfe88799b
commit a22c69dac9

View File

@@ -147,6 +147,10 @@ namespace SqlSugar
return Convert.ToInt64(value);
}
}
else if (type == UtilConstants.DateTimeOffsetType)
{
return FormatDateTimeOffset(value);
}
else if (type == UtilConstants.BoolType)
{
return value.ObjToBool() ? "1" : "0";
@@ -161,6 +165,10 @@ namespace SqlSugar
}
}
}
public override string FormatDateTimeOffset(object value)
{
return "'" + ((DateTimeOffset)value).ToString("o") + "'";
}
}
}