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 timestamp with timezone

Post new topic  Reply to topic
 insert timestamp with timezone « View previous topic :: View next topic » 
Author Message
kiranshet89
PostPosted: Wed Apr 15, 2015 8:54 am    Post subject: insert timestamp with timezone Reply with quote

Newbie

Joined: 13 Mar 2015
Posts: 8

Hi.
I need to insert a timestamp with timezone(
2000-12-12T10:45:34.100-06:00)into a sql Server database with data type datetimeoffset(7).When i cast it to timestamp with format yyyy-MM-ddTHH:mm:ssSSSZZZ it inserts a wrong timestamp to database (like with a timestamp one hour more than input.But i want same timestamp as the input.How to do this?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 15, 2015 9:07 am    Post subject: Re: insert timestamp with timezone Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kiranshet89 wrote:
(like with a timestamp one hour more than input.But i want same timestamp as the input.


This sounds a lot like a problem with daylight savings settings. What are the relevant settings for the 2 servers in question?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 15, 2015 10:32 am    Post subject: Re: insert timestamp with timezone Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kiranshet89 wrote:
Hi.
I need to insert a timestamp with timezone(
2000-12-12T10:45:34.100-06:00)into a sql Server database with data type datetimeoffset(7).When i cast it to timestamp with format yyyy-MM-ddTHH:mm:ssSSSZZZ it inserts a wrong timestamp to database (like with a timestamp one hour more than input.But i want same timestamp as the input.How to do this?


OK so let's get the terminology right. Let's understand what the timestamp is before the cast. And please specify the version of the IIB or WMB including fixpack.

When having to switch timezones, I like to do it using Java only. IIRC ESQL may not always consider the date and time and just apply the current time offset... So if your date was outside of Daylight Saving(s) and you cast it today you might be one hour off. And please remember that SimpleDateFormat is not threadsafe...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » insert timestamp with timezone
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.