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 » Get Current Date in different TimeZone

Post new topic  Reply to topic
 Get Current Date in different TimeZone « View previous topic :: View next topic » 
Author Message
saurabh867
PostPosted: Wed Dec 14, 2011 10:46 pm    Post subject: Get Current Date in different TimeZone Reply with quote

Voyager

Joined: 13 Jun 2010
Posts: 78

Hi,

Is there any ESQL function available to give the current date in a given time zone as in JAVA?
I searched in InfoCenter but could not locate any such function.

Regards,
Saurabh
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu Dec 15, 2011 1:00 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

AFAIK there is no such inbuilt function available in ESQL. You should either add or sub from the GMT Timestamp.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Dec 15, 2011 5:13 am    Post subject: Re: Get Current Date in different TimeZone Reply with quote

Grand High Poobah

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

saurabh867 wrote:
Is there any ESQL function available to give the current date in a given time zone as in JAVA?




Timestamps are either GMT or in the broker's locale because that's typically what you'd use; the GMT for messages passing round the back office, local time for something a user would see.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 15, 2011 7:48 am    Post subject: Reply with quote

Grand High Poobah

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

You can always set up a java function to transform your timestamp from one timezone to the other...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
saurabh867
PostPosted: Thu Dec 15, 2011 9:01 pm    Post subject: Reply with quote

Voyager

Joined: 13 Jun 2010
Posts: 78

Yes,

That is the last option but it comes with an overhead of having a static method only for getting current date.

Better I would write my own function to create date in the given time zone from the current time.

Thanks for your replies.


Regards,
Saurabh
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 15, 2011 10:14 pm    Post subject: Reply with quote

Grand High Poobah

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

saurabh867 wrote:
Yes,

That is the last option but it comes with an overhead of having a static method only for getting current date.

Better I would write my own function to create date in the given time zone from the current time.

Thanks for your replies.


Regards,
Saurabh

You can do so in ESQL without much of a problem.
However you should be aware of the following
  • In ESQL you would have to provide your own time zone offset for at least the target
  • You should always provide the CURRENT_GMTTIMEZONE as input
  • Don't know if the "feature" always giving the current offset to GMT when dealing with a (prior/future) date has been fixed in the current version...


This is why I thought that using Java which takes care of all of the above problems would not be a hardship there.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Get Current Date in different TimeZone
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.