Develop
2015.04.07 16:27
[ios] GMT Date와 Local Date 변환하기
Views 923 Comment 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] Hybrid 앱 스터디 발표 자료
-
[ios] How To Use UIScrollView to Scroll and Zoom Content (Using Swift)
-
[ios] How To Use UIScrollView to Scroll and Zoom Content (Using Objective-C)
-
[ios] How to set up clang formatter
-
[ios] GPS 이용 상태 확인
-
[ios] GMT Date와 Local Date 변환하기
-
[ios] GCD 변수 사용 예제
-
[ios] FlckrFeed Example App (Swift)
-
[ios] Facebook SDK 로그인 설명
-
[ios] Facebook Cache 갱신하는 함수
-
[ios] DJBros. (DJ요맨~)
-
[ios] Did UIScrollView End Scrolling?