To convert Alaska time to GMT in Swift, you can use the DateFormatter
and TimeZone
classes. Here's an example function that takes an alaskaTime
String
and returns the equivalent GMT String
:
main.swift689 chars18 lines
Example usage:
main.swift201 chars7 lines
Note:
gistlibby LogSnag