mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 16:49:20 +00:00
16 lines
397 B
Swift
16 lines
397 B
Swift
//
|
|
// TimeZoneExtension.swift
|
|
// Linphone
|
|
//
|
|
// Created by QuentinArguillere on 06/08/2024.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension TimeZone {
|
|
// Format timezone identifier as a string of the form : GMT{+,-}[-12, 12]:00 - {Identifier}
|
|
func formattedString() -> String {
|
|
let gmtOffset = self.secondsFromGMT()/3600
|
|
return "GMT\(gmtOffset >= 0 ? "+" : "")\(gmtOffset):00 - \(self.identifier)"
|
|
}
|
|
}
|