---
name: "updateDpPeriodTime"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "updateDpPeriodTime - Set time period."
summary: "Set time period."
---

## updateDpPeriodTime

> [VERSION] @ray-js/lock-sdk >= 1.0.0

### Description

Update the time range of a time-range DP

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `dpCode` | `string` | Yes | DP code |
| `data` | `UpdateDpPeriodTimeParams` | Yes | Start/end time |
| `option` | `UpdateDpPeriodTimeOption` | No | Options |

##### UpdateDpPeriodTimeParams properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `start` | `number` | Yes | - | Start time (minutes) |
| `end` | `number` | Yes | - | End time (minutes) |


##### UpdateDpPeriodTimeOption properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `offlineDp` | `boolean` | No | - | Whether to use offline task delivery when the device is offline |


### Return Value

Type: `Promise<void>`

None (resolve after successful delivery)

### Examples

#### Example

```ts
import { updateDpPeriodTime } from '@ray-js/lock-sdk';
await updateDpPeriodTime(30);
```
