• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone


  • Subject: Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone
  • From: David Reed <email@hidden>
  • Date: Fri, 14 Jan 2011 17:59:15 -0500

Thanks. I should have indicated I did add an additional comment to my bug a month or two later when it wasn't fixed. The only response from Apple in my bug report is the original duplication comment.

Dave

On Jan 14, 2011, at 5:13 PM, Laurent Daudelin wrote:

> From what I was told by Apple developer support, you're supposed to add a comment to your duplicate requesting an update for the original ticket.
>
> -Laurent.
> --
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin 				http://www.nemesys-soft.com/
> Logiciels Nemesys Software              				email@hidden
>
> On Jan 14, 2011, at 13:57, email@hidden wrote:
>
>>
>> I'm not the original author of this thread, but I submitted a bug back in August 2010 about these issues. It was marked as a duplicate and I've never heard anything more. Perhaps I don't know how to properly follow duplicates. My bug # is 8320528.
>>
>> Dave
>>
>>
>> On Jan 14, 2011, at 4:34 PM, Deborah Goldsmith wrote:
>>
>>> Did you write a bug for this? What is the bug number?
>>>
>>> Thanks,
>>> Deborah Goldsmith
>>> Apple Inc.
>>>
>>> On Jan 10, 2011, at 10:12 AM, Steve Mykytyn wrote:
>>>
>>>> UIDatePicker (4.2.1) shows differing dates for the modes
>>>>
>>>> UIDatePickerDate (correct),  and
>>>>
>>>> UIDatePickerDateAndTime (incorrect)
>>>>
>>>> when the timezone you assign to the UIDatePicker is
>>>>
>>>> - more than 12 hours ahead (east) of the systemTimeZone of the iPhone.
>>>>
>>>> For example,
>>>>
>>>> device system time zone = America/Los Angeles = GMT - 8
>>>>
>>>> Honolulu date: Dec 7, 1941 7:48am
>>>>
>>>> Tokyo date: Dec 8, 1941 3:18am
>>>>
>>>> UIDatePicker will show the Tokyo date for mode
>>>>
>>>> UIDatePickerDate (correct): Dec 8, 1941
>>>>
>>>> UIDatePickerDateAndTime: Dec 7, 1941
>>>>
>>>> In fact, UIDatePicker will show incorrect dates in this case for any time zone east of GMT + 4 (always one day before correct day)
>>>>
>>>>
>>>> A work-around in viewDidLoad is:
>>>>
>>>> 	self.datePicker.datePickerMode = UIDatePickerModeDateAndTime;
>>>>
>>>> 	self.datePicker.minuteInterval = 1;
>>>>
>>>> 	self.datePicker.timeZone = timeZone;
>>>>
>>>> 	[NSTimeZone setDefaultTimeZone:timeZone];  //  *** add this line to force date picker to show correct date in all modes
>>>>
>>>> 	[self.datePicker setDate:tzDate animated:YES];
>>>>
>>>> and in viewWillDisappear add:
>>>>
>>>> 	[NSTimeZone resetSystemTimeZone];
>>>>
>>>> 	[NSTimeZone setDefaultTimeZone:[NSTimeZone systemTimeZone]];
>>>>
>>>> Not super happy about the work-around, but it should be fairly robust even if this bug is fixed in future.
>>>>
>>>> If anyone can shed some light on this behavior, please advise.  No amount of fooling around with calendars, locales, etc. fixed this until i reset the default zone.
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> Cocoa-dev mailing list (email@hidden)
>>>>
>>>> Please do not post admin requests or moderator comments to the list.
>>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>>
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>
>>> _______________________________________________
>>>
>>> Cocoa-dev mailing list (email@hidden)
>>>
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone (From: Steve Mykytyn <email@hidden>)
 >Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone (From: Deborah Goldsmith <email@hidden>)
 >Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone (From: email@hidden)
 >Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone
  • Next by Date: Re: Determining whether a dictionary is mutable or not
  • Previous by thread: Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone
  • Next by thread: Re: UIDatePicker displays incorrect day in UIDatePickerDateAndTime mode for zones 12+ hours ahead of defaultZone
  • Index(es):
    • Date
    • Thread