One Logo Pool Ball
Foundation · IOS API REFERENCE

NSTimeZone

class · SDK 27.1

class NSTimeZone

Members (28)

static

resetSystemTimeZone

TypeScript
static resetSystemTimeZone(): void
Swift declaration
class func resetSystemTimeZone()
init

init

TypeScript
static initForSecondsFromGMT(seconds: number): NSTimeZone
Swift declaration
convenience init(forSecondsFromGMT seconds: Int)
init

init

TypeScript
static initAbbreviation(abbreviation: string): (NSTimeZone) | null
Swift declaration
convenience init?(abbreviation: String)
get · iOS 4.0+

abbreviationDictionary

TypeScript
static get abbreviationDictionary(): Record<string, string>
Swift declaration
class var abbreviationDictionary: [String : String] { get set }
set · iOS 4.0+

abbreviationDictionary

TypeScript
static set abbreviationDictionary(value: Record<string, string>)
Swift declaration
class var abbreviationDictionary: [String : String] { get set }
get

default

TypeScript
static get default(): TimeZone
Swift declaration
class var `default`: TimeZone { get set }
set

default

TypeScript
static set default(value: TimeZone)
Swift declaration
class var `default`: TimeZone { get set }
get

knownTimeZoneNames

TypeScript
static get knownTimeZoneNames(): Array<string>
Swift declaration
class var knownTimeZoneNames: [String] { get }
get

local

TypeScript
static get local(): TimeZone
Swift declaration
class var local: TimeZone { get }
get

system

TypeScript
static get system(): TimeZone
Swift declaration
class var system: TimeZone { get }
get · iOS 4.0+

timeZoneDataVersion

TypeScript
static get timeZoneDataVersion(): string
Swift declaration
class var timeZoneDataVersion: String { get }
method

abbreviation

TypeScript
abbreviationFor(aDate: globalThis.Date): (string) | null
Swift declaration
func abbreviation(for aDate: Date) -> String?
method · iOS 2.0+

daylightSavingTimeOffset

TypeScript
daylightSavingTimeOffsetFor(aDate: globalThis.Date): number
Swift declaration
func daylightSavingTimeOffset(for aDate: Date) -> TimeInterval
init

init

TypeScript
static initName(tzName: string): (NSTimeZone) | null
Swift declaration
init?(name tzName: String)
init

init

TypeScript
static initNameData(tzName: string, aData?: (ArrayBuffer) | null): (NSTimeZone) | null
Swift declaration
init?(name tzName: String, data aData: Data?)
method

isDaylightSavingTime

TypeScript
isDaylightSavingTimeFor(aDate: globalThis.Date): boolean
Swift declaration
func isDaylightSavingTime(for aDate: Date) -> Bool
method

isEqual

TypeScript
isEqual(aTimeZone: TimeZone): boolean
Swift declaration
func isEqual(to aTimeZone: TimeZone) -> Bool
method · iOS 2.0+

localizedName

TypeScript
localizedName(style: NSTimeZone_NameStyle, locale?: (Locale) | null): (string) | null
Swift declaration
func localizedName(_ style: NSTimeZone.NameStyle, locale: Locale?) -> String?
method · iOS 2.0+

nextDaylightSavingTimeTransition

TypeScript
nextDaylightSavingTimeTransitionAfter(aDate: globalThis.Date): (globalThis.Date) | null
Swift declaration
func nextDaylightSavingTimeTransition(after aDate: Date) -> Date?
method

secondsFromGMT

TypeScript
secondsFromGMTFor(aDate: globalThis.Date): number
Swift declaration
func secondsFromGMT(for aDate: Date) -> Int
get

abbreviation

TypeScript
get abbreviation(): (string) | null
Swift declaration
var abbreviation: String? { get }
get

data

TypeScript
get data(): ArrayBuffer
Swift declaration
var data: Data { get }
get

isDaylightSavingTime

TypeScript
get isDaylightSavingTime(): boolean
Swift declaration
var isDaylightSavingTime: Bool { get }
get · iOS 2.0+

daylightSavingTimeOffset

TypeScript
get daylightSavingTimeOffset(): number
Swift declaration
var daylightSavingTimeOffset: TimeInterval { get }
get

description

TypeScript
get description(): string
Swift declaration
var description: String { get }
get

name

TypeScript
get name(): string
Swift declaration
var name: String { get }
get · iOS 2.0+

nextDaylightSavingTimeTransition

TypeScript
get nextDaylightSavingTimeTransition(): (globalThis.Date) | null
Swift declaration
var nextDaylightSavingTimeTransition: Date? { get }
get

secondsFromGMT

TypeScript
get secondsFromGMT(): number
Swift declaration
var secondsFromGMT: Int { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

NSTimeZone.init()

inherited init: cannot prove legal (class declares 4 custom initializers)

All Foundation types →