NSDate's GMT offset changing with month change.
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