Update pgsql FormatDateTimeOffset

This commit is contained in:
sunkaixuan 2023-08-11 18:07:31 +08:00
parent e647b2de12
commit fc67f25191
2 changed files with 9 additions and 1 deletions

View File

@ -97,5 +97,12 @@ namespace SqlSugar
return batchInsetrSql.ToString();
}
}
public override string FormatDateTimeOffset(object value)
{
var date = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value);
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff zzz") + "'";
}
}
}

View File

@ -223,7 +223,8 @@ namespace SqlSugar
}
public override string FormatDateTimeOffset(object value)
{
return "'" + ((DateTimeOffset)value).ToString("o") + "'";
var date = UtilMethods.ConvertFromDateTimeOffset((DateTimeOffset)value);
return "'" + date.ToString("yyyy-MM-dd HH:mm:ss.fff zzz") + "'";
}
}
}