Author |
Message
|
Crazydev |
Posted: Tue Mar 28, 2017 11:03 am Post subject: British Summer Time bring interpretted as Bangladesh ST |
|
|
Newbie
Joined: 28 Mar 2017 Posts: 4
|
Hi
I'm in the UK and we are using broker 6.1 on a Solaris server
and have been using the GMTTIMESTAMP function to convert EST ESD and JST date time to GMT date time. But when i try to use BST date time in the GMTTIMESTAMP function, it seems like the broker is interpreting BST as Bangladesh Standard Time (instead of British Summer Time) and hence giving a date stamp 5 hours out.
I'm not quite sure how the broker is doing is
Any help or pointers would be greatly appreciated
Thank you
Last edited by Crazydev on Tue Mar 28, 2017 11:08 am; edited 1 time in total |
|
Back to top |
|
 |
Crazydev |
Posted: Tue Mar 28, 2017 11:05 am Post subject: |
|
|
Newbie
Joined: 28 Mar 2017 Posts: 4
|
Sorry i should have mentioned that we are using broker 6.1 |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 28, 2017 11:23 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I could download the v6.1 info center
And do some research..
But it's probably better if you show your code, show the input and show the output.
And stop using v6.1.... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
missing_link |
Posted: Tue Mar 28, 2017 11:29 am Post subject: |
|
|
 Acolyte
Joined: 08 Jan 2004 Posts: 60
|
|
Back to top |
|
 |
adubya |
Posted: Tue Mar 28, 2017 10:28 pm Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
As per Jeff above, please post some concise code + input and output.
Use the [code] your code here [/code] tags to enclose the code. _________________ Independent Middleware Consultant
andy@knownentity.com |
|
Back to top |
|
 |
zpat |
Posted: Tue Mar 28, 2017 11:06 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Quote: |
9. Using the zzz option can have ambiguous results. For example, BST can be interpreted as Bangladesh Standard Time or British Summer Time. For compatibility reasons, IBM® Integration Bus uses the former interpretation.
To avoid these problems, use the zzzz option with a well-defined name; for example, Europe/London, Asia/Dhaka, or America/Los_Angeles
|
I always thought it odd that IBM developers based in the UK would choose BST to mean Bangladesh and surely it would be a bear trap waiting.
As for "Europe/London", have they not heard of BREXIT?  _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
Crazydev |
Posted: Wed Mar 29, 2017 12:49 am Post subject: |
|
|
Newbie
Joined: 28 Mar 2017 Posts: 4
|
Hi
Below is the code
The variable vTIMESTAMP is [b]TIMESTARTED=Tue Mar 28 01:52:50 BST 2017[\b] and when used in the code below is [b]Mar 28 01:52:50 BST 2017[\b]
and vFILE_TIMESTAMP after declaration is being set to [b]GMTTIMESTAMP '2017-03-27 19:52:50'[\b]
Code: |
DECLARE vFILE_TIMESTAMP GMTTIMESTAMP CAST(SUBSTRING(vTIMESTAMP FROM 17) AS GMTTIMESTAMP FORMAT 'MMM dd HH:mm:ss zzz yyyy');
DECLARE vGMT_CONVERTED_TIMESTAMP GMTTIMESTAMP CAST(vFILE_TIMESTAMP AS TIMESTAMP);
|
I have just tried zpat's suggestion
Code: |
SET vTIMESTAMP = REPLACE(vTIMESTAMP, 'BST', 'Europe/London');
DECLARE vFILE_TIMESTAMP TIMESTAMP CAST(SUBSTRING(vTIMESTAMP FROM 17) AS TIMESTAMP FORMAT 'MMM dd HH:mm:ss zzzz yyyy');
|
and it Works!
We never know you could do that.
We are looking to move to IB10 later this year, finally!
Thank you all for your time, and help. It is much appreciated, honestly!!! |
|
Back to top |
|
 |
Crazydev |
Posted: Wed Mar 29, 2017 12:52 am Post subject: |
|
|
Newbie
Joined: 28 Mar 2017 Posts: 4
|
and keeping with honesty. I just looked in the manual and saw the section that zpat highlighted.
Again thank you all, and lesson learned  |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 29, 2017 4:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
I always thought it odd that IBM developers based in the UK would choose BST to mean Bangladesh and surely it would be a bear trap waiting. |
"Compatibility reasons" is often IBM-speak for "some jerks already did this and we need to stick with it"
zpat wrote: |
As for "Europe/London", have they not heard of BREXIT? |
Not when they wrote the docs. Another thing to be decided in the Article 50 negotiations. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Mar 29, 2017 5:22 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Vitor wrote: |
Not when they wrote the docs. Another thing to be decided in the Article 50 negotiations. |
Which (for the benfit or otherwise) of the various ex-pats, was triggered at lunchtime BST today. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 29, 2017 5:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
smdavies99 wrote: |
Vitor wrote: |
Not when they wrote the docs. Another thing to be decided in the Article 50 negotiations. |
Which (for the benfit or otherwise) of the various ex-pats, was triggered at lunchtime BST today. |
They triggered it in Bangladesh?
(Triple Latte free with Starbucks Rewards, so I bought another one with money. Pity anyone in a meeting with me today......) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|