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 » Timezone Conversion

Post new topic  Reply to topic Goto page Previous  1, 2
 Timezone Conversion « View previous topic :: View next topic » 
Author Message
fjb_saper
PostPosted: Wed Aug 23, 2017 5:47 pm    Post subject: Re: Timezone Conversion Reply with quote

Grand High Poobah

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

Vitor wrote:
Sneh4nsu wrote:

SOLVED!!!
Code:
DECLARE putTime TIMESTAMP;
   SET putTime = InRefProp.CreationTime + INTERVAL '0' HOUR;

This will convert InputRoot.Properties.CreationTime from GMT to local time zone.
thanks everyone!!


I have no idea how that could work unless your local time zone was aligned with GMT.

But if it meets your requirements, then it's a win so go in peace.

Could it be because the raw data behind the timestamp and the gmttimestamp is the same, the rest is just a matter on how you display it?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Thu Aug 24, 2017 4:09 am    Post subject: Re: Timezone Conversion Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Sneh4nsu wrote:
SOLVED!!!
Code:
DECLARE putTime TIMESTAMP;
   SET putTime = InRefProp.CreationTime + INTERVAL '0' HOUR;

This works because the declared type of the putTime variable is TIMESTAMP, and there is an implicit cast in the assignment from GMTTIMESTAMP to TIMESTAMP.

The "+ INTERVAL '0' HOUR" doesn't do anything. The code should work just as well without it:

Code:
DECLARE putTime TIMESTAMP;
SET putTime = InRefProp.CreationTime;
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Aug 24, 2017 4:10 am    Post subject: Re: Timezone Conversion Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

fjb_saper wrote:
Could it be because the raw data behind the timestamp and the gmttimestamp is the same, the rest is just a matter on how you display it?


Well. The ESQL representation of time/date information is actually in the local time zone.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Timezone Conversion
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.