---
title: "init(significantEvent:offset:)"
framework: homekit
role: symbol
role_heading: Initializer
path: "homekit/hmsignificanttimeevent/init(significantevent:offset:)"
---

# init(significantEvent:offset:)

Creates a new significant time event with the specified significant event and offset.

## Declaration

```swift
init(significantEvent: HMSignificantEvent, offset: DateComponents?)
```

## Parameters

- `significantEvent`: The significant event for this trigger, for example doc://com.apple.homekit/documentation/HomeKit/HMSignificantEvent/sunrise.
- `offset`: A date components instance that represents the offset from the significant event that this event fires.

## Return Value

Return Value An initialized significant time event which fires at the specified offset from the provided significant event.

## Discussion

Discussion To specify that this event should fire before the significant event, supply a date components object with negative values. For example, to specify 30 minutes before sunset, the minute property of the offset argument must be set to -30.
