Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

adjust-date-to-timezone

adjust-date-to-timezone

Adjusts a date value to a specific time zone, or removes the time zone component from the date value.

Syntax

fn:adjust-date-to-timezone(
arg
,
timezone
)
The following table describes the arguments:
Argument
Required/
Optional
Description
arg
Required
The date value that is to be adjusted.
The date-value is of type xs:date or is an empty sequence.
timezone
Optional
A duration that represents the time zone to which date-value is to be adjusted.

Return Value

The fn:adjust-date-to-timezone function behaves differently depending on whether the $arg date value already has a time zone, and on the value of the time zone provided as given below:
  • The $timezone argument is expressed as an xs:dayTimeDuration, for example -PT5H for US Eastern Standard Time.
  • If $timezone is an empty sequence, returns an xs:date without a time zone. Otherwise, returns an xs:date with a time zone.
  • If $arg already has a time zone, its value is adjusted to that time zone.
  • To adjust the time zone, an xs:date is treated as an xs:dateTime with time 00:00:00 .
  • If $arg does not already have a time zone, its date part stays the same, and the time is associated with the specified time zone.
  • If $timezone is omitted from the function call, it is assumed to be the implicit time zone.

Examples

The following table contains examples and return values for the adjust-date-to-timezone function:
Examples
Return Values
adjust-date-to-timezone( xs:date('2023-02-15'), xs:dayTimeDuration('-PT8H'))
2023-02-15-08:00
adjust-date-to-timezone( xs:date('2023-02-15-03:00'), xs:dayTimeDuration('-PT8H'))
2023-02-14-08:00
adjust-date-to-timezone( xs:date('2023-02-15'), ())
2023-02-15
adjust-date-to-timezone( xs:date('2023-02-15-03:00'), ())
2023-02-15
The following table contains examples and return values assuming an implicit time zone of -05:00:
Examples
Return Values
adjust-date-to-timezone( xs:date('2023-02-15'))
2023-02-15-05:00
adjust-date-to-timezone( xs:date('2023-02-15-03:00'))
2023-02-14-05:00

0 COMMENTS

We’d like to hear from you!