Browse Source

Update datetimeoffset pgsql

pull/31/head
sunkaixuan 2 years ago
parent
commit
a22c69dac9
  1. 8
      Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLInsertBuilder.cs

8
Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/SqlBuilder/PostgreSQLInsertBuilder.cs

@ -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") + "'";
}
}
}

Loading…
Cancel
Save