timeZoneFormat¶
Converts the input date String to a date String in the specified time zone.
Parameters¶
Combine the parameters as a JSON structure as input.
| Parameter | Mandatory/Optional | Data Type | Description | 
|---|---|---|---|
| pattern | Mandatory | String | The format of the date to be returned. | 
| inString | Mandatory | String | The date/time to convert. | 
| timezone | Mandatory | String | The timezone for the returned date/time, such as GMT for Greenwich Mean Time. If not specified, GMT is used by default. | 
Return Values¶
| Value | Data Type | Description | 
|---|---|---|
| value | String | The date in the format specified in  | 
Samples¶
var format = tools.DateUtil.timeZoneFormat({"inString":"2021-07-21 16:30:00","pattern":"yyyy-MM-dd HH:mm:ss","timezone":"Europe/London"});
return tools.resultBuilder.build(true, JSON.stringify(format));
Output
"2021-07-21 17:30:00"