|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Standard Time Function |
« View previous topic :: View next topic » |
Author |
Message
|
kash3338 |
Posted: Sun Feb 20, 2011 8:37 am Post subject: Standard Time Function |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
I have a requirement where in i need to set the CURRENT TIME of Singapore for a field in my mapping. I want to know if there is any standard function or Procedure to achieve this or i need to do a manual calculation based on my CURRENT TIME (Where the Broker server is located in India)?
Version of Broker is 6.0.1.3. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Feb 20, 2011 9:07 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Use the search box at the top of this page. Search for current time. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 20, 2011 1:23 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Better: look for GMTTIME and GMTDATE and GMTTIMESTAMP. It is the same all around the world...
see this about CURRENT_GMTTIMESTAMP
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kash3338 |
Posted: Sun Feb 20, 2011 10:57 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
fjb_saper wrote: |
Better: look for GMTTIME and GMTDATE and GMTTIMESTAMP. It is the same all around the world...
see this about CURRENT_GMTTIMESTAMP
Have fun  |
So you mean, we should manually calculate (add/sub) from the GMT time for any particular Country's time? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 20, 2011 11:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kash3338 wrote: |
fjb_saper wrote: |
Better: look for GMTTIME and GMTDATE and GMTTIMESTAMP. It is the same all around the world...
see this about CURRENT_GMTTIMESTAMP
Have fun  |
So you mean, we should manually calculate (add/sub) from the GMT time for any particular Country's time? |
What I mean is that you should always store and calculate in GMT time.
Local Time is only for display purposes, and can be set at anything... I believe there is a variable that you can set for the broker to determine the offset between GMT and Local for display purposes.
Personally I might use a Java function using different time formats (TZ) for parsing and rendering... because I have done so in the past, and it is relatively accurate and takes automatically into account the DST values at the time specified in the values passed. No risk of getting the current (summer time) difference for a DateStamp that is not in summer time...
However if you are passing the date in GMT format like
2011-02-21T02:36:00.365983-05:00 and assign the right format for parsing on the broker, you should never have a doubt as to what the DateStamp is... ( Can't remember now if the standard XML format says -00:00 or just -0000 for the TZ...)
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|