• 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
NSDate's GMT offset changing with month change.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDate's GMT offset changing with month change.


  • Subject: NSDate's GMT offset changing with month change.
  • From: "Jordan Evans" <email@hidden>
  • Date: Sat, 30 Sep 2006 15:07:06 -0700

I create two NSDates, but the only difference is the month, but the
hour and GMT offset changes, why?


The code:

int main (int argc, const char * argv[])
{
   NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

	NSDate *dateOne = [NSDate dateWithString:@"2006-9-02 7:30:12 -0700"];
	NSDate *dateTwo = [NSDate dateWithString:@"2006-1-02 7:30:12 -0700"];

	NSLog(@"dateOne: %@", [dateOne description]);
	NSLog(@"dateTwo: %@", [dateTwo description]);

   [pool release];
   return 0;
}

The output:

2006-09-30 14:54:39.012 NSDateTest[6958] dateOne: 2006-09-02 07:30:12 -0700
2006-09-30 14:54:39.013 NSDateTest[6958] dateTwo: 2006-01-02 06:30:12 -0800
_______________________________________________
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: NSDate's GMT offset changing with month change.
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: CoreDate: Inverse relationship... (follow up)
  • Next by Date: Re: NSDate's GMT offset changing with month change.
  • Previous by thread: Re: Re: How to draw Text inside a NSImage?
  • Next by thread: Re: NSDate's GMT offset changing with month change.
  • Index(es):
    • Date
    • Thread