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-08-2010, 04:32 AM   #1 (permalink)
zaplitny
aLoggers.com
 
Join Date: May 2009
Location: Minsk, Belarus
Posts: 17
zaplitny is on a distinguished road
Send a message via Skype™ to zaplitny
Default UIDatePicker bug in iOS 4

I've found very strange bug of UIDatePicker in iOS4.

It seems that UIDatePicker timeZone is set during project build or something like this. You can reproduce it by setting

Code:
NSLog(@"Date : %@", [[NSDate date] description]);
datePicker.date = [NSDate date];
If you build it and run first time - all is ok. Then change your timezone to another and run it again (without cleaning targets) - in log you'll see correct date (according to new time zone) but in datePicker you'll see other date (from prev time zone). If you clean targets and rebuild it all is ok.

The workaround for this is to set current timezone to datePicker:
Code:
datePicker.timeZone = [NSTimeZone localTimeZone];
It's very strange behavior
zaplitny is offline   Reply With Quote
 

» Advertisements
» Online Users: 340
11 members and 329 guests
alexP, Gary OBrien, greeneye82, heshiming, jimmyon122, matador1978, Paul Slocum, PavelSea, revg, RickSDK
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,552
Threads: 94,078
Posts: 402,731
Top Poster: BrianSlick (7,990)
Welcome to our newest member, veliata73
Powered by vBadvanced CMPS v3.1.0

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