Oracle DateTime Insert ORA-01861/ORA-01843 Bug #799
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#799
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ORA-01861: literal does not match format string
ORA-01843: not a valid month\n"
Can be temporary modified
engine.go
1589 lineThis bug still exist, while inserting a type time.Time
@yixin19 can you see my mark //oracle DateTime Bug @ByJanly?
Yes, you mean that i have to modify the engine.go file.
But when i need to switch between databases, it's not easy.
you can switch and case your db drivers or if oracle
okay thx
If you use goracle driver, the driver can process time.Time, as the code from @jjjachyty you can directly return
t
so that goracle can process it.If you don't want modify the code from xorm, you can create the *sql.DB and use goracle.NewSessionIniter to reset "NLS_DATE_FORMAT" with "yyyy-mm-dd hh24:mi:ss", then It will works!