webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

UTC Date format

  • 1.  UTC Date format

    Posted Thu July 06, 2006 01:54 PM

    Hi All,
    Can we use the getCurrentDateString flow in WmPublic to get the date in UTC format. There is no documentation to say that it supports the UTC format but the service does not give any error if you speciify the timezone as UTC and gives me the same output as I would have got for the GMT time zone. Has anyone had any requirement to get the current date in UTC?

    Regards,
    Bala


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: UTC Date format

    Posted Thu July 06, 2006 02:28 PM

    Hi,

    U can get UTC format using the same service pub.date:getCurrentDateString…and u need to set its attribute as.

    pattern:-- yyyy-MM-dd hh:mm:ss -z

    timezone – UTC

    and now u run the service u will get the time in UTC format…

    bye


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: UTC Date format

    Posted Thu July 06, 2006 02:44 PM

    How do I make sure it is UTC and not GMT because if I use a different varaible for GMT and try to see the output date and timestamp its the same for GMT as well as UTC. according to what I have read thru there seems to be a 0.9 secs difference between the GMT and UTC


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: UTC Date format

    Posted Thu July 06, 2006 04:29 PM

    If you are looking for a date in XML schema “dateTime” format you’ll need a different pattern and perhaps a Flow service.

    For the “trailingZ” form of the XML schema dateTime format you can use the pattern [COLOR=Blue]yyyy-MM-dd’T’HH:mm:ss.SSS’Z’ IF you want to use the timezone offset form of xml schema dateTime, you’ll need a Flow service to reformat the string in order to place a colon between the hours and minutes portions of the offset from GMT.

    Mark
    [/COLOR]


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: UTC Date format

    Posted Thu July 06, 2006 10:52 PM

    Just Curious:
    Q for Bala: why do you need that differentiation between GMT and UTC??


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: UTC Date format



  • 7.  RE: UTC Date format

    Posted Fri July 07, 2006 08:30 PM

    Thanks Rob. That’s why my question to Bala - “why do you need that differentiation between GMT and UTC??”


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: UTC Date format

    Posted Fri July 07, 2006 09:14 PM

    Yeah, that’s why I posted the link. For all intents and purposes (unless Bala is doing something that is very specialized) there is no difference.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 9.  RE: UTC Date format

    Posted Fri July 07, 2006 09:42 PM

    and how-so-ever specialized the request be, Java (nor webMethods) provides a way to differentiate between the two!!

    or for that matter, any other language reading computer clocks!! :wink: And you cant predict or calculate time based on astronomical observations.

    Please note that Java returns UTC rather than GMT. (though the terms are interchanged in usage)

    from Java Sun Date implementation

    [INDENT]Although the Date class is intended to reflect coordinated universal time (UTC), it may not do so exactly, depending on the host environment of the Java Virtual Machine.

    Most computer clocks are not accurate enough to be able to reflect the leap-second distinction.
    [/INDENT]

    Some computer standards are defined in terms of Greenwich mean time (GMT), which is equivalent to universal time (UT). GMT is the “civil” name for the standard; UT is the “scientific” name for the same standard. The distinction between UTC and UT is that UTC is based on an atomic clock and UT is based on astronomical observations, which for all practical purposes is an invisibly fine hair to split. Because the earth’s rotation is not uniform (it slows down and speeds up in complicated ways), UT does not always flow uniformly. Leap seconds are introduced as needed into UTC so as to keep UTC within 0.9 seconds of UT1, which is a version of UT with certain corrections applied. There are other time and date systems as well; for example, the time scale used by the satellite-based global positioning system (GPS) is synchronized to UTC but is not adjusted for leap seconds.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 10.  RE: UTC Date format

    Posted Mon July 17, 2006 07:57 PM

    Thanks a lot for all the replies but in the end I did find out that Wm does give me the output in UTC / GMT. My client had a specific requirement on storing the date time in UTC format.

    Regards,
    Bala


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 11.  RE: UTC Date format

    Posted Mon September 24, 2012 06:56 AM

    Greetings Kapil,
    I need to UTC formatted date for user and i need to save it in DB.
    he requires UTC DATE an UTC timestamp.
    can you please tell how UTC DATE and TimeStamp Looks Like,means to know the format how we need to set and columns to store that in DB.

    waiting for your reply.

    Regards,
    Shaik Karimulla


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 12.  RE: UTC Date format

    Posted Mon September 24, 2012 08:26 AM

    can you please tell me how can i store date and timestamp in utc format in java


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services