Ayman Ibrahim Ayman Ibrahim - 3 months ago 27
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")