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 » cast as time bug?

Post new topic  Reply to topic Goto page 1, 2  Next
 cast as time bug? « View previous topic :: View next topic » 
Author Message
paustin_ours
PostPosted: Mon Feb 18, 2013 9:50 am    Post subject: cast as time bug? Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

I tried casting an external integer variable as time as below

cast( ext_variable AS TIME);

the cast adds an extra hour on a broker that runs on CST. The same cast statement doesnt add the extra hour on a broker running on EST.

same results when i use GMTTIME

Both the brokers are adjusted for DST. Now is this a bug? If anything the broker running on CST should deduct an hour because its non summer month. Am i missing anything here?

Broker version 7 on Linux and also tested on windows, same behavior.
Back to top
View user's profile Send private message Yahoo Messenger
lancelotlinc
PostPosted: Mon Feb 18, 2013 10:17 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Examine your system settings. It's not a broker bug if you are on the latest fix pack. V6.1 had many time problems.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
paustin_ours
PostPosted: Mon Feb 18, 2013 10:24 am    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

I looked at the problems fixed page of broker fixpacks, didnt see any fixes along the lines of a CAST problem with TIME. Can you please tell me what system setting you are referring to?
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Mon Feb 18, 2013 11:09 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There are any number of ways that the system administrators responsible for the machine in CST could have "configured" the clock such that it SHOWS the correct time for CST when in fact the clock is actually SET to Central-Daylight-Time.

Or in fact the clock is actually set to GMT but merely displays the correct time in CST.

And, again, please confirm that you are at v7 or later.
Back to top
View user's profile Send private message
adubya
PostPosted: Mon Feb 18, 2013 12:22 pm    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

What ESQL datatype is your ext_variable ?

INTEGER -> TIME isn't listed as a supported CAST in the infocenter.

And can you give us some examples of input data and output data produced on both the CST and EST brokers ?
Back to top
View user's profile Send private message Send e-mail
paustin_ours
PostPosted: Mon Feb 18, 2013 12:27 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Yes the broker version is v7001.

mqsiservice -t shows CST

even if it is the DST adjustment it shouldn't be adding an hour, should it? that doesn't make any sense.
Back to top
View user's profile Send private message Yahoo Messenger
paustin_ours
PostPosted: Mon Feb 18, 2013 12:30 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

SET Environment.Variables.temp = CAST(10,0,0 AS TIME);

when run on a CST broker stores 11:00 in temp

when run on a EST broker stores 10:00 in temp
Back to top
View user's profile Send private message Yahoo Messenger
paustin_ours
PostPosted: Mon Feb 18, 2013 12:32 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

just to clarify CAST(ext_integer_variable,0,0 as TIME) in my case, i had set my ext variable to INTEGER 10.
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Mon Feb 18, 2013 12:49 pm    Post subject: Reply with quote

Grand High Poobah

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

paustin_ours wrote:
Yes the broker version is v7001.


Despite anything else, you shouldn't be using lower than v7003.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
adubya
PostPosted: Mon Feb 18, 2013 1:08 pm    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

What do you get if you try the following :-

On the CST machine

SET Environment.Variables.temp = CAST('10:00:00CST' AS TIME FORMAT 'HH:MM:sszzz');

On the EST machine

SET Environment.Variables.temp = CAST('10:00:00EST' AS TIME FORMAT 'HH:MM:sszzz');
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Mon Feb 18, 2013 8:17 pm    Post subject: Re: cast as time bug? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

paustin_ours wrote:
SET Environment.Variables.temp = CAST(10,0,0 AS TIME);

when run on a CST broker stores 11:00 in temp
when run on a EST broker stores 10:00 in temp

Is it really stored that way, or is it possible that some subsequent conversion is corrupting the value later on, while trying to display it? Try this:

Code:
SET Environment.Variables.temp = CAST(10,0,0 AS TIME);
SET Environment.Variables.tempString = CAST(Environment.Variables.temp AS CHARACTER);

What is the value of tempString on the different brokers?
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Mon Feb 18, 2013 10:09 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

The same behavior is seen in Broker 7.0.0.3.

When i try cast(environment.varibales.temp as character) interestingly, it shows as

TIME10:00:00 eventhough the value in temp is 11:00:00:000

this was on CST broker
on EST broker
temp had value of 10:00:00:000
and character value after cast was TIME10:00:00:000 no change there.

whats causing this change? To me it looks like a bug. A cast shouldnt worry about DST
Back to top
View user's profile Send private message Yahoo Messenger
rekarm01
PostPosted: Tue Feb 19, 2013 2:06 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Try to be more careful with the typos, when posting code or output. [code] tags are helpful too.

paustin_ours wrote:
When i try cast(environment.varibales.temp as character) interestingly, it shows as

TIME10:00:00

This suggests that there's nothing wrong with either of the two CAST statements, and that some subsequent conversion is corrupting the value later on.

paustin_ours wrote:
eventhough the value in temp is 11:00:00:000

Is it? Please describe in more detail the steps taken to read the value from temp, and then to write it out in a displayable form.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Feb 19, 2013 5:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mqsiservice will do nothing to correct or report an OS that has the clock set to GMT but the values of the clock adjusted to be the correct time in CST.
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Tue Feb 19, 2013 6:22 am    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Quote:
Is it? Please describe in more detail the steps taken to read the value from temp, and then to write it out in a displayable form.


That is what i see in the debugger.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » cast as time bug?
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.