<!--
{
  "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/dateWithTimeIntervalSince1970:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDate(cm)dateWithTimeIntervalSince1970:"
  },
  "title" : "dateWithTimeIntervalSince1970:"
}
-->

# dateWithTimeIntervalSince1970:

Creates and returns a date object set to the given number of seconds from 00:00:00 UTC on 1 January 1970.

```
+ (instancetype) dateWithTimeIntervalSince1970:(NSTimeInterval) secs;
```

## 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 `secs` seconds from the reference date.

## Discussion

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

## See Also

[`var timeIntervalSince1970: TimeInterval`](/documentation/Foundation/NSDate/timeIntervalSince1970)

The interval between the date object and 00:00:00 UTC on 1 January 1970.



---

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)