• 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 timeIntervalSinceNow problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDate timeIntervalSinceNow problem


  • Subject: NSDate timeIntervalSinceNow problem
  • From: PCWiz <email@hidden>
  • Date: Thu, 22 Oct 2009 21:06:05 -0600

In an NSDictionary I have a key called "time" that contains an NSDate object. When I NSLog the NSDictionary the time object appears like this:

"time" = 2009-10-22 20:58:19 +0000;

So what I did was this:

// "myDict" represents the dictionary that contains the time key

NSDate *time = [myDict objectForKey:@"time"];
NSLog(@"%d", [time timeIntervalSinceNow]);

And the result is this:

2009-10-22 21:01:18.949 TestApplication[8263:a0f] -2097072

Not sure what's wrong here, I've taken a look at some examples and they seem to do the same thing.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSDate timeIntervalSinceNow problem
      • From: Sherm Pendley <email@hidden>
    • Re: NSDate timeIntervalSinceNow problem
      • From: Kyle Sluder <email@hidden>
    • Re: NSDate timeIntervalSinceNow problem
      • From: Graham Cox <email@hidden>
    • Re: NSDate timeIntervalSinceNow problem
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: The "correct" approach? Question about creating an NSMutableDictionary instance.
  • Next by Date: Re: NSDate timeIntervalSinceNow problem
  • Previous by thread: Re: The "correct" approach? Question about creating an NSMutableDictionary instance.
  • Next by thread: Re: NSDate timeIntervalSinceNow problem
  • Index(es):
    • Date
    • Thread