Photo Dates

Each photo in Flickr has two dates - the 'taken' date and the 'posted' date.

Taken dates

The 'taken' date represents the time at which the photo has taken. This is extracted from EXIF date if available, else set to the time of upload.

The taken date is always passed around in MySQL 'datetime' format (for both getting dates from and setting dates via the API), which looks like this:

2004-11-29 16:01:26

Which specifies November 29th 2004 at 4:01:26 pm. You can leave off as much of the date as you want and it'll be filled in as needed, e.g.:

2004-04 = 2004-04-01 00:00:00

The date taken should always be displayed in the timezone of the photo owner, which is to say, don't perform any conversion on it.

Taken dates also have a 'granularity' - the accuracy to which we know the date to be true. At present, the following granularities are used:

0Y-m-d H:i:s
4Y-m
6Y
8Circa...

So a photo which was taken some time in June 1980 would have a taken date if 1980-06-01 00:00:00 and a granularity of 4. In the future, additional granularities may be added, so for future compatability you might want to build you application to accept any number between 0 and 10 for the granularity.

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.