mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Upgrade xorm to v1.1.0 (#15869)
This commit is contained in:
7
vendor/xorm.io/xorm/dialects/time.go
generated
vendored
7
vendor/xorm.io/xorm/dialects/time.go
generated
vendored
@@ -19,7 +19,11 @@ func FormatTime(dialect Dialect, sqlTypeName string, t time.Time) (v interface{}
|
||||
case schemas.Date:
|
||||
v = t.Format("2006-01-02")
|
||||
case schemas.DateTime, schemas.TimeStamp, schemas.Varchar: // !DarthPestilane! format time when sqlTypeName is schemas.Varchar.
|
||||
v = t.Format("2006-01-02 15:04:05")
|
||||
if dialect.URI().DBType == schemas.ORACLE {
|
||||
v = t
|
||||
} else {
|
||||
v = t.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
case schemas.TimeStampz:
|
||||
if dialect.URI().DBType == schemas.MSSQL {
|
||||
v = t.Format("2006-01-02T15:04:05.9999999Z07:00")
|
||||
@@ -34,6 +38,7 @@ func FormatTime(dialect Dialect, sqlTypeName string, t time.Time) (v interface{}
|
||||
return
|
||||
}
|
||||
|
||||
// FormatColumnTime format column time
|
||||
func FormatColumnTime(dialect Dialect, defaultTimeZone *time.Location, col *schemas.Column, t time.Time) (v interface{}) {
|
||||
if t.IsZero() {
|
||||
if col.Nullable {
|
||||
|
Reference in New Issue
Block a user