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] GCD 변수 사용 예제
-
[ios] FlckrFeed Example App (Swift)
-
[ios] Facebook SDK 로그인 설명
-
[ios] Facebook Cache 갱신하는 함수
-
[ios] DJBros. (DJ요맨~)
-
[ios] Did UIScrollView End Scrolling?
-
[ios] Debug Extensions (from 종길 차장님 ㅋㅋ)
-
[ios] DatePicker iOS 6.x 이하 디자인.
-
[ios] Crashlytics, Fabfic 설치/설정
-
[ios] CoreData 사용하기 (튜토리얼)
-
[ios] binary를 C코드로 변환