Jump to content

NSDate and Milliseconds

1 post in this topic

Recommended Posts

I have been trying to create a new NSDate object that has the ability to use and set milliseconds. Each time I apply a long value using Unix-style milliseconds, I get dates in the year 2039 and 2132. If I divide that by 10, I get dates in 2004.


I'm getting frustrated here: the rest of the world seems to use milliseconds past 1970, Apple uses milliseconds as a double and converts the precision.


I need the following solution:


Get date and time in milliseconds (ie. System.currentTimeMillis() equivalent in Java)

Set date and time in milliseconds

Display date and time from object that is created after said settings.


I can't seem to figure this out. And there doesn't seem to be any documents online. Someone MUST have done this. HELP! PLEASE!! :D

Link to comment
Share on other sites


  • Create New...