6

Exif timestamps have a format of "YYYY:MM:DD HH:MM:SS", possibly with a timezone at the end.

Is there a general convention for how to handle these timestamps when the known precision is less than to the second?

For instance, for scans of my parent's wedding photos the timestamps should be only "YYYY:MM:DD" without any time of day (since I've no idea what time it was), but that format isn't allowed.

I have a vacation photo that I know was taken in August 1963, but again, "1963:08" isn't considered valid.

I can't be the only one that has scanned old photos and run into this inability to specify precision.

There are obviously many ways around it, such as using one of the description fields and ignoring the date tag, or putting the date in the filename, or … .

I'm wondering if people that frequently work with scanned photos have come up with a standard convention for handling the problem.

2
  • FWIW, I've come across this problem before, and opted for your suggested workaround of putting the information in the filename. – Ashley Apr 13 at 9:16
  • 1
    One minor thing, in the EXIF block, the time zone and sub-seconds are held in separate tags. So it takes all three tags to get the full timestamp. – StarGeek Apr 13 at 15:11
3

Technically according to the EXIF specs, you would use spaces in places where the number isn't known. So August 1963 would be "1963:08: : : ". But not all programs might be able to read, much less write data like this.

Exiftool can write EXIF data like this but requires the use of the -n (--printConv) option. For example
exiftool -EXIF:DateTimeOriginal="1963:08: : : " -n file.jpg
or using the hashtag version of -n
exiftool -EXIF:DateTimeOriginal#="1963:08: : : " file.jpg

XMP timestamps, on the other hand, allow partial dates. With exiftool this would be acceptable
exiftool -XMP:CreateDate=1963:08 file.jpg

The workaround that a lot of people use is to set the unknown values to the first moment after the known date/time. In your example, many people would use "1963:08:01 00:00:00"

2
  • 1
    The first moment would be ambiguous though: is it just August 1963 or full 1st of August 1963 with only time unknown? – Ruslan Apr 13 at 9:06
  • It's completely up to the user how to implement it. The first second of August 1963 would be the time stamp I listed above. As an example, if you browse through GettyImages and look for pre-digital images, you can find images where the year is known but nothing else. This image, for example, is set to to January 1, 1975. – StarGeek Apr 13 at 15:07
1

Assuming your scanned images have EXIF headers, you can use jhead.exe to change time stamp meta data. Jhead is a console (command line) program.

You would be interested in the following options:

-ds  change date stamp YYYY:MM:DD (ignore YYYY:MM and YYYY options)

-ts  change date-time stamp  yyyy:mm:dd-hh:mm:ss

-ft  change file time to EXIF time (handy if you sort images by date-time)

Examples:

jhead -ds1975:04:17 pic.jpg (Note, there is no space between the command & date)

Jhead -ts1975:04:17-00:00:00 pic.jpg I would use the -ts option and set the time to 00:00:00.

If your image file doesn't have an EXIF header, then you can copy the EXIF data from another image with jhead.

Jhead is best used in a batch script. It is compiled for Windows, OS X, and Unix/Linux operating systems. Jhead can be downloaded from: https://www.sentex.ca/~mwandel/jhead/index.html

If you really want to have excellent control over manipulating EXIF data, exiftool is the program of choice. It is a console program and very complicated to use. Again, best used in batch scripts. There are GUI front ends for exiftool which makes life easier.

2
  • 1
    What happens if you try to give it a partial date (only moth & year known) as in the example in the question? – Chris H Apr 13 at 10:35
  • 1
    If you give a partial date (yyyy:mm or yyyy), the digits you didn't change will be unchanged. If you try to be tricky and put in a day of 00, it assumes you want the previous day. EXIFTOOL allows you to put in spaces as in @StarGeek's example. However, I wouldn't do that unless you know that programs you use won't choke on the blanks. – qrk Apr 14 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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