<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSDate/init(timeIntervalSince1970:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDate(im)initWithTimeIntervalSince1970:"
  },
  "title" : "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.

```
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

An `NSDate` object set to `seconds` seconds from the reference date.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)