Ayman Ibrahim Ayman Ibrahim - 7 months ago 63
Swift Question

Equivelant for [NSTimeZone timeZoneWithAbbreviation: @"GMT"] in swift




I need to know the equivalent syntax for
[NSTimeZone timeZoneWithAbbreviation: @"GMT"]

in swift

Answer

Here:

var formatter: NSDateFormatter = NSDateFormatter()
formatter.timeZone = NSTimeZone(abbreviation: "GMT")