withZoneOffset
Syntax
$calendar.withZoneOffset($offset)
Description
Creates a new calendar from the given calendar, setting the time zone offset (UTC) to offset
. Changing the offset can also change other values such as the hour.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
calendar | Business object | The calendar whose time zone offset is to be changed. It can be a system or user calendar. | yes | |
offset | Number | Value for the new time zone offset in milliseconds to be set for the calendar. | yes |
Return value
Type: Business object
A calendar with the changed value for the time zone offset.
Examples
dateTime(2012, 8, 10, 7, 55, 24, 13).toUserCalendar().withZoneOffset(3600000).zoneOffset()
Output: 3.600.000