ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Insert xsd:datetime field into timestamp column problem

Post new topic  Reply to topic
 Insert xsd:datetime field into timestamp column problem « View previous topic :: View next topic » 
Author Message
wmqstankela
PostPosted: Fri Sep 23, 2016 6:52 am    Post subject: Insert xsd:datetime field into timestamp column problem Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Sep 23, 2016 10:59 am    Post subject: Reply with quote

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
View user's profile Send private message
wmqstankela
PostPosted: Mon Sep 26, 2016 12:55 am    Post subject: Reply with quote

Voyager

Joined: 29 Feb 2016
Posts: 94

db is using +01:00 Europe/Prague timezone
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Sep 26, 2016 4:47 am    Post subject: Reply with quote

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
View user's profile Send private message
wmqstankela
PostPosted: Mon Sep 26, 2016 6:24 am    Post subject: Reply with quote

Voyager

Joined: 29 Feb 2016
Posts: 94

But when i changed db timezone it still insert same value(add 1 hour)
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Sep 26, 2016 6:40 am    Post subject: Reply with quote

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
View user's profile Send private message
wmqstankela
PostPosted: Mon Sep 26, 2016 6:58 am    Post subject: Reply with quote

Voyager

Joined: 29 Feb 2016
Posts: 94

I resolved problem when set current_gmttimestap instead current_timestamp in esql.

Thanks Vitor!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Insert xsd:datetime field into timestamp column problem
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.