On Sep 15, 2008, at 03:49 , Markus Spoettl wrote:
Hi List,I just know it must be there but I can't see it. How can I get to the NSTimeZone for a given NSDate. When using -description: the date got a time zone, so it's stored in there but how on earth can I get to it? I only need the GMT offset (numerically, not as string), in case there's a simpler way to obtain this.
All NSDate objects are stored as seconds since the reference date (Jan 1 1970 00:00 GMT) and so are always GMT. The description is using the default time zone to adjust the date. You can get the default time zone with [NSTimeZone defaultTimeZone] and then you can get the offset with -(NSTimeInterval)secondsFromGMT.
HTH, Jason
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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 [EMAIL PROTECTED]