From 677c0d7411fe380dfcde87e887bfa80624f43954 Mon Sep 17 00:00:00 2001 From: getsu Date: Fri, 3 Jul 2020 08:10:09 +0000 Subject: [PATCH] fix invalid date when update for oracle (#1694) Merge branch 'master' into master Merge branch 'master' into master Merge branch 'master' into master fix invalid date when update for oracle Co-authored-by: Lunny Xiao Co-authored-by: chendy Reviewed-on: https://gitea.com/xorm/xorm/pulls/1694 --- session_update.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/session_update.go b/session_update.go index 62116c47..7df8c752 100644 --- a/session_update.go +++ b/session_update.go @@ -206,7 +206,11 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6 colNames = append(colNames, session.engine.Quote(table.Updated)+" = ?") col := table.UpdatedColumn() val, t := session.engine.nowTime(col) - args = append(args, val) + if session.engine.dialect.URI().DBType == schemas.ORACLE { + args = append(args, t) + } else { + args = append(args, val) + } var colName = col.Name if isStruct {