7
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ FWIW, I've come across this problem before, and opted for your suggested workaround of putting the information in the filename. \$\endgroup\$
    – Ashley
    Apr 13, 2021 at 9:16
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – StarGeek
    Apr 13, 2021 at 15:11

2 Answers 2

4
\$\begingroup\$

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"

\$\endgroup\$
4
  • 1
    \$\begingroup\$ The first moment would be ambiguous though: is it just August 1963 or full 1st of August 1963 with only time unknown? \$\endgroup\$
    – Ruslan
    Apr 13, 2021 at 9:06
  • \$\begingroup\$ 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. \$\endgroup\$
    – StarGeek
    Apr 13, 2021 at 15:07
  • \$\begingroup\$ Is there any reason to prefer the earliest moment to the last one? If all that's known is August 1963, why use 1963:08:01 00:00:00 instead of 1963:08:31 23:59:59? Using the latter puts the photos with partial timestamps at the end of a chronologically sorted list instead of at the beginning, which I find more intuitive. \$\endgroup\$ Dec 10, 2021 at 6:08
  • \$\begingroup\$ It's completely up to you. It's your data, you can set it in the way that works best for you. But in my experience, programs that can read partial tags as I listed will default to the earliest date. \$\endgroup\$
    – StarGeek
    Dec 10, 2021 at 16:22
1
\$\begingroup\$

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.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ What happens if you try to give it a partial date (only moth & year known) as in the example in the question? \$\endgroup\$
    – Chris H
    Apr 13, 2021 at 10:35
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – qrk
    Apr 14, 2021 at 17:36

Your Answer

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

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