Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- RxCocoa
- Human interface guide
- tableView
- Clean Code
- 클린 코드
- uitableview
- map
- uiscrollview
- swift documentation
- combine
- 리팩토링
- UICollectionView
- UITextView
- ios
- 스위프트
- rxswift
- collectionview
- SWIFT
- Refactoring
- scrollview
- ribs
- MVVM
- Observable
- Xcode
- 리펙토링
- clean architecture
- 애니메이션
- swiftUI
- HIG
- Protocol
Archives
- Today
- Total
김종권의 iOS 앱 개발 알아가기
[iOS - swift] TimeZone 지역 값 본문
모든 TimeZone 확인
for timeZone in TimeZone.knownTimeZoneIdentifiers {
print(timeZone)
}
디바이스 기준 TimeZone 값 확인
TimeZone.current.identifier // `Asia/Seoul`
TimeZone을 활용하여 해당 나라의 시간 구하기
func time() {
let date = DateFormatter()
date.locale = Locale(identifier: Locale.current.identifier)
date.timeZone = TimeZone(identifier: TimeZone.current.identifier)
date.dateFormat = "HH:mm"
print(date.string(from: Date()))
}'iOS 기본 (swift)' 카테고리의 다른 글
| [iOS - swift] 전처리기, 전처리문(#if DEBUG), Active Compilation Conditions, OTHER_SWIFT_FLAGS (0) | 2021.03.19 |
|---|---|
| [iOS - swift] switch문 CaseIterable, allCases (0) | 2021.03.14 |
| [iOS - swift] KVO(Key-Value Observing) (0) | 2021.03.07 |
| [iOS - swift] for, stride, Range (0) | 2021.03.03 |
| [iOS - swift] 고차함수map(map, flatMap, compactMap), filter, reduce (0) | 2021.02.28 |
Comments
