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 » MB6: DateTime Conversion Anomaly

Post new topic  Reply to topic
 MB6: DateTime Conversion Anomaly « View previous topic :: View next topic » 
Author Message
ayanc
PostPosted: Tue May 08, 2007 12:53 am    Post subject: MB6: DateTime Conversion Anomaly Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi,

I am trying to convert DateTime from yyyy.MM.dd'T'HH:mm:ss EDT' to yyyy/MM/dd HH:mm:ss.

If the input value is "2005.06.08T10:13:22 EDT" the output obtained is as follows:

Broker in Windows: "2005/06/08 10:13:22"
Broker in Linux: "2005/06/08 11:13:22"

The linux broker is incrementing the hour value by 1. The broker in Windows is giving the correct results.

Now let me provide you further details for clarification:

Windows Setup:

Toolkit: 6.0.2
Broker:

BIPv600 en US
ucnv Console CCSID 437 dft ucnv CCSID 5348
ICUW ibm-5348_P100-1997 ICUA ibm-5348_P100-1997

BIP8996I: Version: 6003
BIP8997I: Product: WebSphere Message Brokers
BIP8998I: CMVC Level: S600-CSD03 DH600-L60821.1
BIP8999I: Build Type: Production

Linux Setup:

Toolkit: 6.0.2 (Same Windows toolkit)
Broker:

BIPv600 en US POSIX
ucnv Console CCSID 1208 dft ucnv CCSID 1208
ICUW US-ASCII ICUA US-ASCII

BIP8996I: Version: 6003
BIP8997I: Product: WebSphere Message Brokers
BIP8998I: CMVC Level: S600-CSD03 DH600-L60821.1
BIP8999I: Build Type: Production

User Trace:

Windows Broker:

CAST(inCharTS AS TIMESTAMP FORMAT inTSFormat)'' at ('.XMLToXML_Compute.FuncChangeTmStmpFmt', '4.24'). This resolved to ''CAST('2005.06.08T10:13:22 EDT' AS TIMESTAMP FORMAT 'yyyy.MM.dd'T'HH:mm:ss' EDT' )''. The result was ''TIMESTAMP '2005-06-08 10:13:22'''.

Linux Broker:

CAST(inCharTS AS TIMESTAMP FORMAT inTSFormat)'' at ('.XMLToXML_Compute.FuncChangeTmStmpFmt', '4.24'). This resolved to ''CAST('2005.06.08T10:13:22 EDT' AS TIMESTAMP FORMAT 'yyyy.MM.dd'T'HH:mm:ss' EDT' )''. The result was ''TIMESTAMP '2005-06-08 11:13:22'''.

Can anyone point me out the reason for the same?

Thanx.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 08, 2007 1:18 am    Post subject: Reply with quote

Grand High Poobah

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

One server believes EDT is a daylight saving +1 hour time zone, the other doesn't?

As a UK resident I have no direct knowledge of this and am guessing, but would look at the locale and timezone settings on the boxes as a 1st pass.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ayanc
PostPosted: Tue May 08, 2007 2:08 am    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi Vitor,

You have provided an interesting angle to this problem. The local timezone settings are different in both the servers.

I tried out the following:

Changed format to: yyyy.MM.dd'T'HH:mm:ss
New input value: "2005.06.08T10:13:22"

Output is the same as observed before. There has been no change even after removing the EDT part.

Does casting into a timestamp modify the input data based on factors such as local timezone of the server? The input data provided does not omit any segment of the Timestamp data type. If yes then how can we work around this problem to reflect the desired value?

Any ideas??
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 08, 2007 2:33 am    Post subject: Reply with quote

Grand High Poobah

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

Urm.....

I think the TIMESTAMP function uses the locale settings to convert what it thinks is a GMT timestamp from MQ (all MQ timestamps are GMT / UTC to prevent exactly this problem) into the "local" version, which clearly could be some hours away from GMT.

Not entirely sure you can convince it not to do this.....

Not entirely sure I'm not talking rubbish....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sourdas2
PostPosted: Tue May 08, 2007 4:40 am    Post subject: Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

Is your config manager is at Version 5.0. Though I am not sure that version 5 configmanager can cause the probleblem.
But I have found that certain eqsl functions does not give intended result in such mixed version.
_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
ayanc
PostPosted: Tue May 08, 2007 5:36 am    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi Sourav,

You seem to have hit a jackpot!!! You are right, and I am sorry for not noticing this earlier ....

The Windows set up has a v6 ConfigMgr, whereas the Linux setup has a version 5 ConfigMgr that is located in a windows server. Now that is really a mixed configuration.

I will have to simulate that in Windows environment.

As far as timezone is concerned, we can now confirm that another windows machine having the same timezone settings as the linux server has been used for testing. The results are still the same.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 08, 2007 7:21 pm    Post subject: Reply with quote

Grand High Poobah

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

ayanc wrote:
Hi Sourav,

You seem to have hit a jackpot!!! You are right, and I am sorry for not noticing this earlier ....

The Windows set up has a v6 ConfigMgr, whereas the Linux setup has a version 5 ConfigMgr that is located in a windows server. Now that is really a mixed configuration.

I will have to simulate that in Windows environment.

As far as timezone is concerned, we can now confirm that another windows machine having the same timezone settings as the linux server has been used for testing. The results are still the same.


Run on both brokers mqsiservice -t and compare the output.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ayanc
PostPosted: Wed May 09, 2007 8:20 pm    Post subject: Reply with quote

Voyager

Joined: 15 Nov 2004
Posts: 88

Hi,

Sorry for the delay in posting the findings.

Here is the result of the mqsiservice command requested:

Results for Linux MB6 (giving errorsome 1 hour delay while using date format function)
============================================
BIPv600 en US POSIX
ucnv Console CCSID 1208 dft ucnv CCSID 1208
ICUW US-ASCII ICUA US-ASCII

Current Local time: 2007-05-09 09:32:55.964664
Current UTC time: 2007-05-09 13:32:55.964780
TimeZone ID: EST
Day Names: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,
Month Names: January, February, March, April, May, June, July, August, September, October, November, December,
First day of week: 1
Days in first week of year: 1
AM: AM PM: PM
BIP8071I: Successful command completion.
============================================

Results for Windows MB6 in the same geographical location
============================================
BIPv600 en US
ucnv Console CCSID 437 dft ucnv CCSID 5348
ICUW ibm-5348_P100-1997 ICUA ibm-5348_P100-1997

Current Local time: 2007-05-09 09:32:59.730
Current UTC time: 2007-05-09 13:32:59.731
TimeZone ID: America/New_York
Day Names: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,
Month Names: January, February, March, April, May, June, July, August, September
, October, November, December,
First day of week: 1
Days in first week of year: 1
AM: AM PM: PM
BIP8071I: Successful command completion.
============================================

Results for Windows MB6 in a different geographical location
============================================
BIPv600 en US
ucnv Console CCSID 437 dft ucnv CCSID 5348
ICUW ibm-5348_P100-1997 ICUA ibm-5348_P100-1997

Current Local time: 2007-05-10 09:38:35.162
Current UTC time: 2007-05-10 04:08:35.170
TimeZone ID: Asia/Calcutta
Day Names: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,
Month Names: January, February, March, April, May, June, July, August, September
, October, November, December,
First day of week: 1
Days in first week of year: 1
AM: AM PM: PM
BIP8071I: Successful command completion.

The interesting thing to note here is the m/c within the same geographical location has but different timezone id (EST & New York). But if that be the cause, then why would timezones as diverse as New York and Calcutta provide the same output.

Did anyone face this kind of a situation yet?
Back to top
View user's profile Send private message
vasumath
PostPosted: Thu Aug 13, 2009 4:15 am    Post subject: Reply with quote

Novice

Joined: 12 Feb 2007
Posts: 15

Hi

I am facing the same issue. Can you please let me know the soln if you have resolved the issue?

Thanks
Vasumathi
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 13, 2009 1:54 pm    Post subject: Reply with quote

Grand High Poobah

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

Where time is that important you should always work with GMTTIMESTAMP. This ensures that the time reference is the same across the world.

Now you can case the GMTTIMESTAMP to a TIMESTAMP but I believe the local time you will get that way depends on the time zone settings of the broker.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
vasumath
PostPosted: Fri Aug 14, 2009 12:31 am    Post subject: Reply with quote

Novice

Joined: 12 Feb 2007
Posts: 15

I have changed the timezone in WINDOWS toolbar -> Adjust Date/time. Still the output is same when I try to cast to timestamp.

Is there any other way to change timezone?
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 » MB6: DateTime Conversion Anomaly
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.