IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only

Return DST time using JAVA API

  • 1.  Return DST time using JAVA API

    Posted 12/03/15 04:30 AM

    Originally posted by: Ejay


    Hello,

    I'm sharing this small Java example, that can be called with a JEXIT().  I wrote this to allow the map to query the DST time offset depending on whether we are in Summer or Winter time.

    It accepts both an input & output format and can be combined with the CURRENTDATETIME() function.

    eg :

    =VALID(JEXIT("EJ.TestCases.CalculateTimeZone","getTimeZone",DATETOTEXT(CURRENTDATETIME("CCYYMMDDHH24MMSS+/-ZZ:ZZ")),"yyyyMMddHHmmssXXX!yyyy-MM-dd'T'HH:mm:ss.SSSXXX"),

     FAIL(LASTERRORMSG()+LASTERRORCODE())))

    All the required instructions and an example usage are in the comments in the WTX map source.

    Attached : Java code, compiled JAR, Typetree and map usage example.

    Hope that can help.

    EJ


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange