Transforming the timezone of de date or dateTime element in OSB using XPATH

The timezone of de date or dateTime element in OSB using XPATH can be translated as:


<!-- to translate it to UTC -->
<ns1:myDateTime>{ adjust-dateTime-to-timezone($myVar/*:myOriginalDateTime,xdt:dayTimeDuration('PT0H')) }</ns1:myDateTime>

<!-- to translate it to local timezone -->
<ns1:myDateTime>{ adjust-dateTime-to-timezone($myVar/*:myOriginalDateTime) }</ns1:myDateTime>

<!-- to translate it to a different timezone, replace ? in de PT?H with the time difference from UTC -->
<ns1:myDateTime>{ adjust-dateTime-to-timezone($myVar/*:myOriginalDateTime,xdt:dayTimeDuration('PT?H')) }</ns1:myDateTime>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s