NSDatePicker takes an NSDate as its value. When you change the system timezone, 
that value does not change. It is still the same NSDate with the same value 
describing the same point in time.

But because the system timezone has changed, the formatted string equivalent 
has changed to match. So your choice is: how do you want to handle the timezone 
change?

A) Generate a new NSDate instance that once formatted gives the appearance of 
the formatted string not having changed.
To do this you'll need to pick up on the notification of system timezone change 
and then adjust all such dates yourself

B) Ignore the change of system timezone for your date picker. Thus the date 
when formatted will continue to look the same.
This should be pretty easy. When creating the date picker, assign it a timezone 
to use rather than accepting the default.

On 26 Nov 2009, at 15:15, Arun wrote:

> Hi All,
> In my application i use a NSDatePicker with stepper to display hours and
> minutes.
> When i change the Timezone of the system in System Preferences, the value in
> the  Date Picker changes.
> How can we prevent change of value in the Date picker when system time zone
> changes?
> 
> Thanks
> Arun KA
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
> 
> This email sent to cocoa...@mikeabdullah.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to