NSDate is not returning my local Time zone /default time zone of device
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My local and default time zone is GMT +5 but when I get date and time by NSDate it return me GMT date and time. For example the code and output from my code while testing on device is as, [device time zone Islamabad GMT +5] NSTimeZone *lo = [NSTimeZone localTimeZone]; NSLog(@" - current local timezone is %@",lo); // GMT +5 2010-12-28 20:56:11.785 Done[484:307] - current local timezone is Local Time Zone (Asia/Karachi (GMT+05:00) offset 18000) NSTimeZone *df = [NSTimeZone defaultTimeZone]; NSLog(@" - current default timezone is %@",df); //