Ayman Ibrahim Ayman Ibrahim - 1 month ago 18
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")
Comments