iOS – How to get raw offset for timezone?

2 Solutions Collect From Internet About “iOS – How to get raw offset for timezone?”

NSInteger millisecondsFromGMT = 1000 * [[NSTimeZone localTimeZone] secondsFromGMT];

In Swift 3 and Swift 4:

let millisecondsFromGmt = 1000 * TimeZone.autoupdatingCurrent.secondsFromGMT()

Please see answer to my question:

It seems to be more precise regarding expression raw offset, because “raw” actually should mean “without DST at all”, like it is in Java (getRawOffset() in java.util.TimeZone class)