TimeZone(identifier: "Etc/GMT+12") get different results in REPL and Xcode project

In REPL, the result is nil.

  1> import Foundation
  2> TimeZone(identifier: "Etc/GMT+12") 
$R0: TimeZone? = nil
  3>  

In Xcode Playground,

Swift version is

Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)

Target: x86_64-apple-darwin20.3.0

Why didn't you use TimeZone on DateFormatter?

Terms of Service

Privacy Policy

Cookie Policy