Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-14-2010, 11:38 AM   #6 (permalink)
dobry
Registered Member
 
Join Date: May 2009
Posts: 104
dobry is on a distinguished road
Default

I'm encountering similar problem on simulator iOS 4.0 (SDK 4 final) without IB and it hasn't to do with timezone change after build (I deleted build, cleaned targets and made rebuild).

Code:
  NSLog(@"birthday=%@",birthdayDate);
  NSLog(@"now     =%@",[NSDate date]);
  [datePicker setDate:bbirthdayDate animated:NO];   
  datePicker.timeZone = [NSTimeZone localTimeZone];
  datePicker.locale   = [NSLocale currentLocale]; 
  datePicker.calendar = [NSCalendar currentCalendar];
  datePicker.datePickerMode = UIDatePickerModeDate;
  [datePicker addTarget:self action:@selector(datePickerValueChanged:) forControlEvents:UIControlEventValueChanged];
NSLog diplays correctly this:
Code:
birthday=2000-07-16 12:00:00 +0300
now     =2010-07-14 19:30:46 +0300
But DatePicker displays 2000-07-15. However on iPad simulator (3.2) and iPhone 3.1.2 it works fine. Seems to be a problem on iOS4. It didn't help to set localTimeZone. Btw - my MacBook and simulator is working with timezone of Ukraine (Kiev). I don't have a device with iOS4 to test it.
dobry is offline   Reply With Quote
 

» Advertisements
» Online Users: 364
8 members and 356 guests
evilmatt10, ipodphone, myrnanu59, NSString, Objective Zero, Pudding, TomTool, williamWang
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,564
Threads: 94,079
Posts: 402,747
Top Poster: BrianSlick (7,990)
Welcome to our newest member, myrnanu59
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:37 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.