Contents

secondsFromGMT(for:)

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

Declaration

func secondsFromGMT(for aDate: Date) -> Int

Parameters

  • aDate:

    The date against which to test the receiver.

Return Value

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

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