• 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
NSDateFormatter vs. -setTimeZone: ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDateFormatter vs. -setTimeZone: ?


  • Subject: NSDateFormatter vs. -setTimeZone: ?
  • From: Jim Correia <email@hidden>
  • Date: Wed, 18 Jan 2006 22:51:05 -0500

Is it expected that -setTimeZone: is ignored for NSDateFormatters not using the 10.4 behavior?

If I create a date formatter and do

[dateFormatter setTimeZone: [NSTimeZone timeZoneForSecondsFromGMT: 0]];
[dateFormatter setFormatterBehavior: NSDateFormatterBehavior10_4];
[dateFormatter setDateFormat: @"yyyy-MM-dd"];

It keeps the local time zone. Reversing the first two lines makes the change to GMT stick.

(If this isn't the expected behavior, I'm happy to write a bug. In any case, it caught me by surprise.)

Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSDateFormatter vs. -setTimeZone: ?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Cocoa Custom NSCell Binding Issue
  • Next by Date: Office 2003 (Windows) style menus
  • Previous by thread: Re: NSLayoutManager subclassing
  • Next by thread: Re: NSDateFormatter vs. -setTimeZone: ?
  • Index(es):
    • Date
    • Thread