About:
- OIC provides date and time in UTC format. Sometimes as per project requirement, we require to change the UTC format to another timezone.
- Oracle provides OOTB XSLT function fn:adjust-dateTime-to-timezone() to achieve this objective.
- The fn:adjust-dateTime-to-timezone() function adjusts an xs:dateTime value to a specific time zone or removes the time zone component from the value.
Use case: we will convert UTC to IST and UK timezone using XSLT function.
Implementation Steps:
Step1: For this POC, we have Scheduled integration
Step2: Drop an assign activity on the integration canvas and create following variables:
currentDateTime: /nssrcmpr:schedule/nssrcmpr:startTime
IndiaTimeZone: string(fn:adjust-dateTime-to-timezone(nssrcdfl:dateTime(/nssrcmpr:schedule/nssrcmpr:startTime),nssrcdfl:dayTimeDuration('PT5H30M')))
UKTimeZone: string(fn:adjust-dateTime-to-timezone(nssrcdfl:dateTime(/nssrcmpr:schedule/nssrcmpr:startTime),nssrcdfl:dayTimeDuration('PT1H')))
Steps with Screenshots:
Testing output:
Reference for more details about the XSLT function:
https://www.ibm.com/docs/en/i/7.2?topic=functions-fnadjust-datetime-timezone-function
No comments:
Post a Comment