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
Delivered-to: email@hidden
Delivered-to: email@hidden
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=KViOxHyPSWqknGt5idYrE4K0jGXO+WdRkDqYycCGjW8m17kE1EqxY1yuNpb3nrA7MrGjrqbflnAfgq99O8wyNgD8v1qdj+BxU7WYRdpIE8/kcUoWpV1gAlGSddZ52+ksmjPtg6bmknsEOOBEEBOeseA6vImJ/KeYO0X2FuMzaew=
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.