---
title: "secondsFromGMT(for:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nstimezone/secondsfromgmt(for:)"
---

# secondsFromGMT(for:)

Returns the difference in seconds between the receiver and Greenwich Mean Time at a given date.

## Declaration

```swift
func secondsFromGMT(for aDate: Date) -> Int
```

## Parameters

- `aDate`: The date against which to test the receiver.

## Return Value

Return Value The difference in seconds between the receiver and Greenwich Mean Time at aDate.

## Discussion

Discussion The difference may be different from the current difference if the time zone changes its offset from GMT at different points in the year—for example, the U.S. time zones change with daylight saving time.

## See Also

### Getting Time Zone Information

- [name](foundation/nstimezone/name.md)
- [abbreviation](foundation/nstimezone/abbreviation.md)
- [abbreviation(for:)](foundation/nstimezone/abbreviation(for:).md)
- [secondsFromGMT](foundation/nstimezone/secondsfromgmt.md)
- [data](foundation/nstimezone/data.md)
- [timeZoneDataVersion](foundation/nstimezone/timezonedataversion.md)
- [NSTimeZone.NameStyle](foundation/nstimezone/namestyle.md)
