The API I am using gives me names like "America/Vancouver". I use this to construct an NSTimeZone and get the the abbreviation, but it's "UTC-7" when I want "Pacific Daylight Time" or "PDT".
How can I get into the zone? And not the danger zone.
The API I am using gives me names like "America/Vancouver". I use this to construct an NSTimeZone and get the the abbreviation, but it's "UTC-7" when I want "Pacific Daylight Time" or "PDT".
How can I get into the zone? And not the danger zone.
Copyright © 2021 Jogjafile Inc.
You can use
TimeZonemethodlocalizedName(for: locale:)to display your timezone name localized. You just need to pass a name style daylight savings or standard. If you need the abbreviation just pass short daylight savings or short standard as I have shown in this post:Usage: