---
title: "init(timeIntervalSince1970:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsdate/init(timeintervalsince1970:)"
---

# init(timeIntervalSince1970:)

Returns a date object initialized relative to 00:00:00 UTC on 1 January 1970 by a given number of seconds.

## Declaration

```swift
convenience init(timeIntervalSince1970 secs: TimeInterval)
```

## Parameters

- `secs`: The number of seconds from the reference date (00:00:00 UTC on 1 January 1970) for the new date. Use a negative argument to specify a date and time before the reference date.

## Return Value

Return Value An NSDate object set to seconds seconds from the reference date.

## Discussion

Discussion This method is useful for creating NSDate objects from time_t values returned by BSD system functions.

## See Also

### Initializing a Date

- [init()](foundation/nsdate/init().md)
- [init(timeIntervalSinceNow:)](foundation/nsdate/init(timeintervalsincenow:).md)
- [init(timeIntervalSinceReferenceDate:)](foundation/nsdate/init(timeintervalsincereferencedate:).md)
- [init(coder:)](foundation/nsdate/init(coder:).md)
