This seems like a simple task that software accomplishes all the time, but I haven't found a reliable way to do it.

There is the DateTimeOriginal EXIF tag, but that is in local time. And it seems there is no standard EXIF tag for the time zone, per this question:
Is there any hope for Exif TimeZoneOffset as a standard?

The top answer there suggests looking in the XMP metadata instead, but that doesn't seem to work either. I have examples from the stock Android 4.4 camera which include literally 3 XMP values (none of them about time).

Then, there is the EXIF GPS timestamp, which is thankfully in UTC. However, as established here, the GPS timestamp is for when the GPS location fix was obtained. I have an example of a photo I took after an international flight where the last GPS fix was before the flight, in another country, hours and thousands of miles away.

I'm trying to write an application that can take any photo with metadata and place it on a timeline, so I need a general way to do this. I know software and websites do this all the time, so it seems there must be a way, right? Or do they just have teams doing research on every make and model of camera and phone, discovering their idiosyncratic way of recording time?

  • \$\begingroup\$ Well, then reset the GPS fix before each shot. \$\endgroup\$ Aug 23, 2016 at 11:59
  • \$\begingroup\$ I'm really not sure how this differs from the previous question, other than that that you aren't happy with the answers. But asking it again won't make you any happier.... \$\endgroup\$
    – mattdm
    Aug 23, 2016 at 12:42
  • 2
    \$\begingroup\$ I suspect the websites you're thinking of have a fairly high tolerance for errors, plus they often use the upload time as a timestamp and IP geolocation for the upload. For example I've had it offer to tag a location in a country I've never visited that was 2000km away at the time, because that's where the other end of the satellite link was. I've also been in the same room as someone at the same time their photos tagged then in another city - because they uploaded them on arrival. \$\endgroup\$
    – Chris H
    Aug 23, 2016 at 21:15
  • \$\begingroup\$ @mattdm To clarify, the previous question was one piece of the puzzle: Can you get the time from GPSTimeStamp? The answer was no. So, having exhausted all options I know about, here I'm asking if there's any way I don't know of to get the time an arbitrary photo was taken. \$\endgroup\$
    – Nick S
    Aug 23, 2016 at 22:18

1 Answer 1


Unfortunately not. Most cameras only have a 'dumb' timezone-ignorant clock. You do of course also have no guarantee that the clock is set right, so the timestamp in the EXIF data may be wrong anyway, even if you know or assume the correct time zone.

What you might do to improve your interpretation of the EXIF timestamp is, if the image is geo-tagged, to find the time zone for the location, on which the image was taken. There are several services offering such functionality, some of which you can find in this Stackoverflow question: How to get a time zone from a location using latitude and longitude coordinates?. This is of course also not fail-proof, since a tourist or traveller is perhaps likely to leave the camera clock at the 'home' time zone, even if travelling to another time zome.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.