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