{"id":1061,"url":"https://github.com/gligorkot/TimeZonePicker","last_synced_at":"2025-07-30T20:31:03.663Z","repository":{"id":56924289,"uuid":"97641361","full_name":"gligorkot/TimeZonePicker","owner":"gligorkot","description":"A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone.","archived":false,"fork":false,"pushed_at":"2020-08-05T22:04:31.000Z","size":504,"stargazers_count":125,"open_issues_count":3,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-24T01:41:38.616Z","etag":null,"topics":["swift","swift-3","swift3","timezone","timezone-library","timezone-list","timezone-picker","timezones"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gligorkot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"gligorkot","ko_fi":"gligor"}},"created_at":"2017-07-18T20:33:39.000Z","updated_at":"2024-03-12T23:17:31.000Z","dependencies_parsed_at":"2022-08-21T05:20:35.179Z","dependency_job_id":null,"html_url":"https://github.com/gligorkot/TimeZonePicker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gligorkot%2FTimeZonePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gligorkot%2FTimeZonePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gligorkot%2FTimeZonePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gligorkot%2FTimeZonePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gligorkot","download_url":"https://codeload.github.com/gligorkot/TimeZonePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228179153,"owners_count":17881137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["swift","swift-3","swift3","timezone","timezone-library","timezone-list","timezone-picker","timezones"],"created_at":"2024-01-05T20:15:38.082Z","updated_at":"2024-12-04T19:32:44.303Z","avatar_url":"https://github.com/gligorkot.png","language":"Swift","funding_links":["https://github.com/sponsors/gligorkot","https://ko-fi.com/gligor","https://ko-fi.com/gligor'"],"categories":["Date \u0026 Time","Swift"],"sub_categories":["Getting Started","Other free courses","Linter"],"readme":"# TimeZonePicker\n\n[![Build Status](https://app.bitrise.io/app/a8aacfeca49db0dd/status.svg?token=SyGPKzROHbYxep4c9-9czA)](https://app.bitrise.io/app/a8aacfeca49db0dd)\n[![codebeat badge](https://codebeat.co/badges/dac53a60-fe1f-4b5f-9098-99b17d720977)](https://codebeat.co/projects/github-com-gligorkot-timezonepicker-master)\n[![Version](https://img.shields.io/cocoapods/v/TimeZonePicker.svg)](http://cocoadocs.org/docsets/TimeZonePicker)\n[![License](https://img.shields.io/cocoapods/l/TimeZonePicker.svg)](http://cocoadocs.org/docsets/TimeZonePicker)\n[![Platform](https://img.shields.io/cocoapods/p/TimeZonePicker.svg)](http://cocoadocs.org/docsets/TimeZonePicker)\n\n\u003ca href='https://ko-fi.com/gligor' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\nA TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone.\n\n## Screenshots\n\n![](Screenshots/Screenshot.png)\n![](Screenshots/Preview.gif)\n\n## Installation\n\n### CocoaPods\n\nTo install it in your iOS project, install with [CocoaPods](http://cocoapods.org)\n\n```ruby\npod 'TimeZonePicker'\n```\n\n## Usage\n\n### Basic Initialisation\n\nTo initialise a `timeZonePicker` you can use the class function `getVC(withDelegate: TimeZonePickerDelegate)` on the `TimeZonePickerViewController` as below:\n\n```swift\nlet timeZonePicker = TimeZonePickerViewController.getVC(withDelegate: self)\n```\n\nThen you can use the `timeZonePicker` as you would any `UIViewController`, for example:\n\n```swift\npresent(timeZonePicker, animated: true, completion: nil)\n```\n\n### TimeZonePickerDelegate\n\nThe `TimeZonePickerDelegate` currently has only one method that needs to be implemented:\n\n```swift\nfunc timeZonePicker(_ timeZonePicker: TimeZonePickerViewController, didSelectTimeZone timeZone: TimeZone)\n```\n\nOnce an item is selected from the table of cities/countries the above delegate method gets called, conveniently returning the `TimeZonePickerViewController` and the selected `TimeZone`. You can use the `timeZonePicker` to dismiss it here and the `timeZone` as you need it in your application. For example:\n\n```swift\nfunc timeZonePicker(_ timeZonePicker: TimeZonePickerViewController, didSelectTimeZone timeZone: TimeZone) {\n    timeZoneName.text = timeZone.identifier\n    timeZoneOffset.text = timeZone.abbreviation()\n    timeZonePicker.dismiss(animated: true, completion: nil)\n}\n```\n\nPlease check the `TimeZonePickerExample` project for the above usage example. If you have any questions do not hesitate to get in touch with me.\n\n## Requirements\n\n* iOS 8 or later.\n* Swift 3\n\n## License\n    Copyright (c) 2017 Gligor Kotushevski\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgligorkot%2FTimeZonePicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgligorkot%2FTimeZonePicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgligorkot%2FTimeZonePicker/lists"}