Develop
2015.04.07 16:27
[ios] GMT Date와 Local Date 변환하기
조회 수 917 댓글 0
# Local Date -> GMT Date
NSDate *localDate = <<your local date>>; NSTimeInterval timeZoneOffset = [[NSTimeZone systemTimeZone] secondsFromGMTForDate:localDate]; // NOTE the "-" sign! NSDate *gmtDate = [localDate dateByAddingTimeInterval:-timeZoneOffset];
# GMT Date -> Local Date
NSDate *gmtDate = <<your gmt date>> NSTimeInterval timeZoneOffset = [[NSTimeZone systemTimeZone] secondsFromGMTForDate:gmtDate]; NSDate *localDate = [gmtDate dateByAddingTimeInterval:timeZoneOffset];
[출처] http://stackoverflow.com/questions/1862905/nsdate-convert-date-to-gmt
-
[ios] GMT Date와 Local Date 변환하기
-
[ios] GPS 이용 상태 확인
-
[ios] How to set up clang formatter
-
[ios] How To Use UIScrollView to Scroll and Zoom Content (Using Objective-C)
-
[ios] How To Use UIScrollView to Scroll and Zoom Content (Using Swift)
-
[ios] Hybrid 앱 스터디 발표 자료
-
[ios] IB 없이 개발하기 (html)
-
[ios] iCloud관련 저장 디렉토리
-
[ios] In App Purchase 개발
-
[ios] iOS 4.0 beta 에서 3.1.3으로 다운그레이드 하는 법
-
[ios] iOS 6.0 이상 회전 하기 (이전 버전과 비교 변경 부분)
-
[ios] iOS 7 이상 UIBarButtonItem 여백