---
schema_version: "1"
id: 066d00b8bb861cf5c887c02e5bd847f2607823020eb259a3938470a3f94c4f4c
title: toTimeZone
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/dw-coercions-functions-totimezone.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/dw-coercions-functions-totimezone
source_site: docs.mulesoft.com
content_type: documentation
content_hash: cfd70590a44f01d032faeb04ad24eff376d6a167b49258a19d66bc2504de8105
description: MuleSoft Documentation Site
release: "2.4"
latest: false
---
# toTimeZone

## [](#totimezone1)toTimeZone(str: String): TimeZone

`String`​ 値を ​`TimeZone`​ 値に変換します。

_DataWeave バージョン 2.4.0 で導入されました。_​

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>str</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>TimeZone</code>​ 値に変換する ​<code>String</code>​ 値。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、さまざまな入力での ​`toTimeZone`​ の動作を示します。 `application/dw`​ 形式の出力が生成されます。

#### [](#ソース)ソース

```DataWeave
%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
{
  toTimeZoneOffset: |-03:00|,
  toTimeZoneAbbreviation: |Z|,
  toTimeZoneName: |America/Argentina/Buenos_Aires|
}
```