I'm using ObjectiveFlickr to retrieve a collection of photos from Flickr. The dates are returned as strings like "1309695647
".
What are these numbers? Milliseconds? I can't figure out how to define a date format to convert them into NSDate
objects using NSDateFormatter
:(
The Flickr documentation doesn't help and I can't find anything on google :(
The high probability is that these dates are regular timestamps (unsigned int, number of seconds since January 1, 1970). See below:
http://www.flickr.com/services/api/misc.dates.html
Posted dates
The 'posted' date represents the time at which the photo was uploaded to Flickr. This is set at the time of upload.
The posted date is always passed around as a unix timestamp, which is an unsigned integer specifying the number of seconds since Jan 1st 1970 GMT.
All posted dates are passed around in GMT and it's up to the application provider to format them using the relevant viewer's timezone.