%dw 2.0
import * from dw::util::Coercions
output application/dw
---
{
toTimeZoneOffset: toTimeZone("-03:00"),
toTimeZoneAbbreviation: toTimeZone("Z"),
toTimeZoneName: toTimeZone("America/Argentina/Buenos_Aires")
}
DataWeave
toTimeZone
toTimeZone(str: String): TimeZone
Transform a String
value into a TimeZone
value.
Introduced in DataWeave version 2.4.0.
Parameters
Name | Description |
---|---|
|
The |
Example
This example shows how toTimeZone
behaves with different inputs.
It produces output in the application/dw
format.
Source
Output
{
toTimeZoneOffset: |-03:00|,
toTimeZoneAbbreviation: |Z|,
toTimeZoneName: |America/Argentina/Buenos_Aires|
}
DataWeave