Author |
Message
|
Vijji |
Posted: Tue Aug 07, 2007 7:48 am Post subject: Timezone problem |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Hi ,
My Environment is MBv5.0 CSD5,MQ5.3 and Windows2000 .I am getting problem with TimeZone .
Actually I am getting input message as XML in MRM domain.XML souce messageset contains a field with xsd:Time datatype.The target messageset format is also XML and had a field of datatype xsd:Time.Here I'm doing some manipulations on the incoming Time field and mapping it to the target Time field.
Quote: |
The input message timefield format is like
19:00:00-05:00
The Outputmesage format which I'm getting is 00:00:00-04:00 |
But expected output is 00:00:00-05:00
Why I'm getting the Timezone difference?
Thanks in Advance,
Vijji. |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Aug 07, 2007 7:39 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
which timezone is ur broker running???
mqsiservice -t _________________ Cheers |
|
Back to top |
|
 |
Vijji |
Posted: Tue Aug 07, 2007 9:09 pm Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Hi Akanksha,
Thanks for ur reply.My broker is running on EST.One more thing when i'm mapping directly with out any manipulations i'm getting correct timezone. |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Aug 07, 2007 9:25 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
you need an instant upgrade
can u paste your eSQL code here _________________ Cheers |
|
Back to top |
|
 |
Vijji |
Posted: Wed Aug 08, 2007 12:34 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Here is my esql code
Code: |
SET OutputRoot.MRM.endTime = SUBSTRING(CAST(InputRoot.MRM.beginTime AS CHAR) FROM 7 FOR 8); |
Which upgrade is needed for this? |
|
Back to top |
|
 |
AkankshA |
Posted: Wed Aug 08, 2007 12:44 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
Quote: |
you need an instant upgrade |
5.3 is going out of support... and CSD5 days are way back too....
Quote: |
Code: |
SET OutputRoot.MRM.endTime = SUBSTRING(CAST(InputRoot.MRM.beginTime AS CHAR) FROM 7 FOR 8) |
|
this statement would return endTime as char element... that too those last 8 digits... are u casting it back ?? how u creating the timestamp back?? are u providing GMTTIMESTAMP option there??
doesn't gv me a claer picture of happenings there.. may be some more information about the manipulations u r doing with this might help me in helping u .... _________________ Cheers |
|
Back to top |
|
 |
srikanth av |
Posted: Wed Aug 08, 2007 10:54 am Post subject: |
|
|
Apprentice
Joined: 30 Jun 2005 Posts: 37
|
Hi All,
I am friend of Vijji and this is the code she has written:
She has modified the code and written like this according to our requirement
DECLARE BeginTime TIME;
DECLARE cBeginTime CHAR;
SET BeginTime = InputRoot.MRM.beginTime;
SET cBeginTime = CAST(BeginTime AS CHAR);
EVAL('SET OutputRoot.'||DATETime||'BeginTime'||Cast(I as Char)||'='||cBeginTime);
Here DATETime and I are Variables which are computed before. |
|
Back to top |
|
 |
Vijji |
Posted: Thu Aug 09, 2007 6:28 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
I'm still stuck with this problem.Please help me out. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 09, 2007 6:33 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Can you be clear about what you are trying to accomplish?
Also, please consider using {} instead of EVAL.
It looks like you're trying to do some stuff with dates/times, but you're using character variables. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|