Author |
Message
|
wmqstankela |
Posted: Fri Sep 23, 2016 6:52 am Post subject: Insert xsd:datetime field into timestamp column problem |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
Hi all,
I have field createTime which is xsd:datetime type. I want to insert it to Oracle db timestamp column using mapping node. I send this createTime = TIMESTAMP '2016-09-23 13:27:30.961690' but in db it insert TIMESTAMP '2016-09-23 14:27:30.961690. Add 1 hour to the value.
Please help |
|
Back to top |
|
 |
Vitor |
Posted: Fri Sep 23, 2016 10:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
What timezone is the db using? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
wmqstankela |
Posted: Mon Sep 26, 2016 12:55 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
db is using +01:00 Europe/Prague timezone |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 26, 2016 4:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
wmqstankela wrote: |
db is using +01:00 Europe/Prague timezone |
And behold, it's adding an hour to the timestamp when it inserts it.
My tame Oracle minion is out of the office today (we're all pretending the office burnt down and he's reacting by taking a vacation) but I would try adding a timezone indicator to the timestamp so Oracle knows it's already the local time. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
wmqstankela |
Posted: Mon Sep 26, 2016 6:24 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
But when i changed db timezone it still insert same value(add 1 hour) |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 26, 2016 6:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
wmqstankela wrote: |
But when i changed db timezone it still insert same value(add 1 hour) |
Did you tell the dba that you were doing that? I wonder how many other users are wondering why their applications have started misbehaving?
Why not try my idea of an explicit time zone on the time stamp? I know I'm no Oracle expert, but you could at least humor me. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
wmqstankela |
Posted: Mon Sep 26, 2016 6:58 am Post subject: |
|
|
Voyager
Joined: 29 Feb 2016 Posts: 94
|
I resolved problem when set current_gmttimestap instead current_timestamp in esql.
Thanks Vitor!!! |
|
Back to top |
|
 |
|