[iOS] 현재 시간을 GMT로 표시하기
iOS2011. 9. 20. 16:13
NSTimeZone 적용 부분을 삭제하면 현재 지역의 기준 시간으로 표시된다.
NSTimeZone* timeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT"];
NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setTimeZone:timeZone];
[dateFormatter setDateFormat:@"dd.MM.yyyy HH:mm:ss Z"];
NSLog(@"%@", [dateFormatter stringFromDate:[NSDate date]);'iOS' 카테고리의 다른 글
[iOS] 외부 폰트 사용하기 (0) | 2011.10.12 |
---|---|
[iOS] UIWebView 에 Bounce 효과 제거 (0) | 2011.10.10 |
[iOS] 동기적으로 동작하는 UIAlertView (Custom UIAlertView) (0) | 2011.09.28 |
[iOS] UIView 흔들기 효과 (0) | 2011.09.28 |
[iOS] In App Purchase 앱에서 구매내역 확인 (0) | 2011.09.20 |
[iOS] Device ID (0) | 2011.09.19 |
[iOS] 문장이 화면에 표현되는 높이와 길이 얻기 (0) | 2011.09.05 |
[iOS] UITextView를 Rounded Rect 형태로 표현하기 (0) | 2011.09.02 |
[iOS] 아이폰의 현재 상태가 세로(Portrait)인지 가로(Landscape)인지 확인하는 방법 (0) | 2011.09.02 |
[iOS] xcode 삭제 (0) | 2011.07.21 |