Main Menu

Dates: exif and file

Started by tomczak, March 05, 2011, 12:40:11 PM

Previous topic - Next topic

tomczak

Could someone straighten me out on the interpretation of various dates associated with images/files: where are they written and what events may/have change(d) them?

1) DateTimeOriginal, ModifyDate, and CreateDate are all in EXIF?
2) What's the difference between the DateTimeOriginal and CreateDate?
3) Is File Modify Date the same as Modify Date in Standard Details list? It is a file stamp and have nothing to do with EXIF, right?
4) Files have DateCreated, DateModified, and DateAccessed stamps, right? The one that we can see in exiftool GUI is the DateModified?  Does the DateAccessed change every time a file is viewed?

Thanks.

Phil Harvey

Quote from: tomczak on March 05, 2011, 12:40:11 PM
1) DateTimeOriginal, ModifyDate, and CreateDate are all in EXIF?

These tags may be found in various types of metadata, including EXIF.

Quote
2) What's the difference between the DateTimeOriginal and CreateDate?

DateTimeOriginal is the time when the image was captured (on film, or by a digital camera).  CreateDate is the time when the digital image file was first created (by scanner, or same as DateTimeOriginal for a digital camera).

Quote
3) Is File Modify Date the same as Modify Date in Standard Details list? It is a file stamp and have nothing to do with EXIF, right?

FileModifyDate is not information contained within the file.  It is the time stored by your filesystem to indicate the last time the file was modified.  This can change if you copy the file to another computer.

ModifyDate is contained in the EXIF, and should be updated when the image is edited.

Quote
4) Files have DateCreated, DateModified, and DateAccessed stamps, right? The one that we can see in exiftool GUI is the DateModified?  Does the DateAccessed change every time a file is viewed?

The tag called FileModifyDate is from the filesystem (what you call DateModified).  What you call DateCreated is not displayed by exiftool.  Neither is DateAccessed.  I don't know what affects DateAccessed.  Both DateCreated and DateAccessed are system dependent, and may have a different meaning or not exist at all on different systems.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Ok I enter at this point.
I found four Dates/Times in the Metadata of an image:






File Modification Date/Time: 2009:04:07 23:01:06+02:00
Modify Date: 2008:10:04 08:56:31
Date/Time Original: 2008:10:04 08:56:31
Create Date: 2008:10:04 08:56:31

You have explained the last three entrys in the post before.
But what is the first entry? Seems that this is the system Modification Date because when I modify the image with
exiftool -AllDates-=1 Bild.jpg
this will change to the current Time/Date.

What I try to do is I will change the Date shown in "Finder" as well. Because "Finder" list Dates like "Erstellt" "Geändert" "Zuletzt geöffnet" (german)
I understand you that these Dates are not stored in the file directly? What is "File Modification Date/Time" when this is not the system Date?
And how can I change all Dates/Times of the file to the one of the Metadata?
-Mac OSX Mountain Lion-

Phil Harvey

There is a bit of confusion because the tag named FileModifyDate has the description "File Modification Date/Time".

By default, the descriptions are shown.  Use -s to show the tag names, or -lang de to show the descriptions in Deutsch.

FileModifyDate is updated to the current time when the file is rewritten unless you use the -P option to preserve it.

Also, you can use the -G or -G1 (or -g or -g1) to show the group names so you can see where the tags came from.  All filesystem tags are in the family 0 "File" group and the familiy 1 "System" group.  Other date/time tags will likely be in EXIF groups.

You can copy tags back and forth from wherever you want to wherever you want using a command like this:

exiftool "-DSTTAG<SRCTAG" FILE

Where FILE is the image file name, DSTTAG is the destination tag, and SRCTAG is the source tag.  You copy as many tags as you want in the same command by adding more arguments like this.


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Thanks, wonderfull, perfect!
Your descriptions are perfect. Not only a few words but as many as needed to describe things that users like me understand it. Thanks for for your detailed help. I will try it when I am back at home.

First I thought that the information I got was only EXIF Data.
But you said it is a combination of Exif, File and System and when I do not use a parameter like "-G" all informations I could get are listed in one unsorted list. But nothing is left. Only not sorted.
Is there any Date/Time which is not listed bei ExifTool? In my list I can see four Dates/Times. The last three are from Exif what I can read in your description. Maybe the first is the one from File or System. But in "Finder" I can see more Dates/Times. Finder shows
"Erstellt" Maybe equal to "Create Date"
"Geändert" Maybe equal to "Modify Date" or "FileModifyDate"
"Zuletzt geöffnet" No analogy in Exif
All are shown with the Date 2009:04:07 23:01:06. So I think this Dates are not from the Exif Data because Exif are listed with the year 2008. "Geändert" could be the "FileModifyDate". When this is right it seems that the file has six or seven? different Dates/Times.

  • File Modification Date/Time (Maybe "Geändert")
  • Modify Date   
  • Date/Time Original
  • Create Date
  • Erstellt
  • Zuletzt geöffnet
Is ExifTool not shown all Dates of a file?
-Mac OSX Mountain Lion-

Phil Harvey

ExifTool only shows the filesystem modification date.  The filesystem creation date and access date are not available on all filesystems so they are not extracted by ExifTool.  (Unix filesystems do not support creation dates, and many systems do not support access dates.)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Now I know that the "File Modification Date/Time" is used in Finder for the "Geändert or Erstellt". I changed this File Information with ExifTool and I can see the change in Finder. So MacOSX(Unix) displays a "Erstellt =Creation" Date. What do you mean with it does not support creation dates. It is listed in Finder?!

I also used the "G" an "G1" parameter.
"G1" show me tags which are listed before with "G" as File now with System. With "G" all tags which are called System (with the use of "G1") are called File.
What is the different between "G" and "G1"? I can't find a description in your manuell.

exiftool "-DSTTAG<SRCTAG" FILE works great. So now I will apply it on all my 6.000 images. I think all dates in my image should be "DateTimeOriginal". So I will see the main Date Finder in whatever view I am.
-Mac OSX Mountain Lion-

Phil Harvey

Quote from: JanK on March 31, 2011, 06:57:18 AM
What do you mean with it does not support creation dates. It is listed in Finder?!

I said that Unix filesystems don't support creation dates.  You likely have your disk formatted with an OSX partition, which does support creation dates.

Quote
I also used the "G" an "G1" parameter.
"G1" show me tags which are listed before with "G" as File now with System. With "G" all tags which are called System (with the use of "G1") are called File.
What is the different between "G" and "G1"? I can't find a description in your manuell.

See here for a list of all group names, or here for descriptions.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Oh I thought that MacOSX Filesystem = Unix Filesystem. But I was wrong.

I read it already but I could not find the relation to -G1 or -G. Now after reading again I tried the -G2 -G3 -G4 and I understand what you want to say in the docu.
-Mac OSX Mountain Lion-

Phil Harvey

#9
Right.  Maybe I should have explained:  -G is the same as -G0 -- it gives you the family 0 group names.

Also, you can specify multiple families with options like -G0:1 (see the application documentation).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Everything for now is clear. Yes this site (application documentation) I was searching for. I saw it a few days before but can't find it back until now.

Maybe I could now start my exiftool "-FileModifyDate<DateTimeOriginal" ImageFolder with 6000 files in it but I'm a little bit nervous if nothing goes wrong. Is there anything else I should consider? I read something about that exiftools creates an _original at the end of a file when writing metadata.
But this only happens when I use for example exiftool -AllDates-=1 IMAGE.JPG but not with exiftool "-FileModifyDate<DateTimeOriginal" IMAGE.JPG. So I hope that there will be no 6000 new files created.
-Mac OSX Mountain Lion-

Phil Harvey

#11
The "_original" files are only created if you change information contained within the file itself.  (ie. if you change any "real" tag.  The 3 "pseudo" tags are the exception: FileName, Directory and FileModifyDate.  Documented here.)

I suggest running the command on a temporary directory containing a few images first to be sure that it works as expected before unleashing it on your image collection.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Ok, the "FileModifyDate" belongs to the Bild.jpg but it is not written directly in the file. For example if I could take the Bild.jpg away from any file system this information will be lost?
In real world I could not take the Bild.jpg away from a file system so on every copy (ie. from a hard drive to a CD back to another hard drive to a floppy disk and back to a hard drive ; or in my situation from Windows to a CD to a Mac) the pseudoinformation "FileModifyDate" is copied seperatly besides the Bild.jpg and is stored in any filesystem on which the Bild.jpg was copied and is assigned to the Bild.jpg again and again. So it looks like that the "FileModifyDate" is inside the Bild.jpg but it isn't.
So like your description the proper Bild.jpg is not rewritten when I change the "FileModifyDate" because I only change a data besides this JPG stored in the filesystem.
Is this right?
-Mac OSX Mountain Lion-

Phil Harvey

I think you understand now.

But I think you could find cases when FileModifyDate is changed when copying. I haven't tried this, but I would think that all filesystem date/times would be changed if you try this:

1) Copy a file to a USB thumb drive.

2) Change the computer timezone.

3) Copy the file back to the computer.

Most USB drives are formatted with a FAT32 filesystem, which I believe stores date/times as localtime without timezone, and if so the times will change with your computer's timezone.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

I want to change the time (AllDates) of images first and then set "FileModiyDate" to the "DateTimeOriginal" of the image. And I do not want to create _original images.

My question is in which order do I have to write the camands?

exiftool "-AllDates+=0:50" -P -overwrite_original "-DateTimeOriginal>FileModifyDate" ImageFolder

I think that I don't have to use the "-P" because in the next step I override the "FileModifyDate". But for not doing anything that I do not want I use the -P.

In your examples you use things like that:
"text"
'text'
-Parameter="xxx"
"-Parameter=xxx"

I don't know when I have to use quotation marks and where i have to use it. And when I will use some parameters like -P or -overwrite_original, on which place should I write it?
-Mac OSX Mountain Lion-

Phil Harvey

The quotes only need to be used if the argument contains special characters (like space, >, <, |, and maybe some others, depending on your system).

The order of the arguments is not very important for what you are doing.  The problem is that it must be done as 2 separate commands:

1) exiftool "-AllDates+=0:50" -overwrite_original ImageFolder

2) exiftool "-DateTimeOriginal>FileModifyDate" ImageFolder

You don't need -overwrite_original for the 2nd command because it doesn't modify any "real" tags in the file, so a backup isn't created.

Note that these 2 commands may be combined into a single command line, but this is a more advanced technique:

exiftool "-AllDates+=0:50" -overwrite_original -execute "-DateTimeOriginal>FileModifyDate" -common_args ImageFolder

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Thanks!

Parameters which belongs to an argument have to be separated by it's own line or by -execute.
I read something about "-execute" in your documentation.

You missed the "ImageFolder" at the end of the first command. When I write some more camands (you mean this with "-common_args" I think) do I have to write -execute before each argument ?

For example:
exiftool -argument1 -parameterTo1 -execute -argument2 -parameterTo2 -execute -argument3 -parameterTo3 ...

Is this done as complete separate tasks? Meaning that argument2 is applied on the output of argument1 and argument 3 on the output of argument2?

Thanks Jan
-Mac OSX Mountain Lion-

Phil Harvey

Hi Jan,

Quote from: JanK on August 09, 2011, 01:49:32 AM
You missed the "ImageFolder" at the end of the first command.

No I didn't, but I did forget that you are using an argument file.  The -common_args option applies all subsequent arguments to all commands on the line, but it can not be used inside an argument file.  So in this case the command would look like:

exiftool -@ my.args -common_args ImageFolder

witht this "my.args" file:

-AllDates+=0:50
-overwrite_original
-execute
-DateTimeOriginal>FileModifyDate


QuoteWhen I write some more camands (you mean this with "-common_args" I think) do I have to write -execute before each argument ?

You use -execute after all options for a command if you want to begin another command on the same command line.  You must specify a source file for each command, but the -common-args option gives you a way to specify the same source file(s) for all commands at once.

These are effectively executed as separate tasks.  In my previous post, the two techniques will have identical effects.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Hi,

we talked about the "creation date" of the filesystem and that Exiftool only shows the "File Modification Date" which belongs to the filesystem and not the "creation Date" because it is not available on any operation system. I have MacOSX and so I have a "creation date".

For a better view I will change the "creation date" of my pictures as well but there are some inconsistencies.

For now I will describe what I did:
I have pictures from three different cameras of an event.
I change the time of some camera collection with exiftool '-AllDates+=0:03' -overwrite_original DIR to match the same timeline of the other cameras.
I renamed all pictures in order to the "datetimeoriginal".
I change the file modification Date to the DateTimeOriginal with exiftool '-DateTimeOriginal>FileModifyDate' DIR

In MacOSX Finder the Dates "FileModifyDate" and also the "CreationDate", are updated to the DateTimeOriginal. This happen for two of three cameras. At the third camera the CreationDate is not changed.

  • I thought with the described command I will change the FileModifyDate only. Why is the CreationDate also changed?
  • And why has the CreationDate of one camera not touched. It is shown the same date as before. "01.01.1970 ; 01.00" I know this is the starting date of chronology from computers. So it could be that there is no CreationDate available for this camera files and so it is shown the first available date. But when the others are updated to the same date as the FileModifyDate, why aren't these dates updated too
-Mac OSX Mountain Lion-

Phil Harvey

Quote from: JanK on October 25, 2011, 05:34:00 PM
1. I thought with the described command I will change the FileModifyDate only. Why is the CreationDate also changed?

The filesystem creation date should have been reset to the current date by your '-AllDates+=0:03' command.  Just setting FileModifyDate should not change this because this doesn't involve rewriting the file.

You must use -overwrite_original_in_place if you want to preserve the filesystem creation date when writing any real tags to the file.

Quote2. And why has the CreationDate of one camera not touched.

This would happen if there were no dates to change with '-AllDates+=0:03'.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

QuoteThe filesystem creation date should have been reset to the current date by your '-AllDates+=0:03' command.
Yes I Can confirm that. All dates in Finder are set to the current date.

When I change a real tag it is the "AllDates" command. Because of this it is not needed to preserve the Create Date. The old CreateDate is wrong (belongs to no real date with which I can do something) And the CreateDate of the day on which I apply the AllDates command is also not very usefull. Don't understand me wrong, I will change the CreateDate.  So after applying AllDates I use exiftool '-DateTimeOriginal>FileModifyDate' DIR to set the FileModifyDate to the DateTimeOriginal. With this the CreationDate in Finder is also changed to the DateTimeOriginal.

1. This is great for me. But I want to know if this is a intentional function because the command says "FileModificationDate" and not CreationDate.

Now I know why this do not work with some files. These files have no CreationDate because I coppyed it from other filesystem and did not change a real tag with "AllDates" (The Dates were ok so I don't have to change them).

2. Is there a way to get a CreationDate for these files without changing a tag in the file? Without that I have the CreationDate 1970 shown in Finder(meaning there is no creationDate).
-Mac OSX Mountain Lion-

Phil Harvey

When I write FileModifyDate on my Mac and look at the date/times with SPLAT-I in the finder, the "Modified" date changes, but the "Created" date does not.  (OSX 10.7.2)  I don't understand why you are apparently seeing a different behaviour.

I don't know how to set the filesystem creation date.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

#22
This is confusing.
With all my files the CreateDate is changed when I use FileModifyDate.

System
Mac OSX 10.7.2
Exiftool 8.68

Example: A file copyed from a CD. You see it has no Create date. It also works with files that already have a create date but I will show the effect of no CreateDate too.

Translation:
Erstellt = Create
Geändert = Modified
Zul. Geöffnet = Last open


1. The dates of the file before starting. Same are shown with commandd-I.


2. I applyed exiftool '-DateTimeOriginal>FileModifyDate' '1.jpg' Nothing happen to CreateDate because at this time no CreateDate exists. I did it only to show the non effecting to CreateDate when there is no existing CreateDate (1970)


3. I applyed exiftools '-AllDates+=0:10:00'  '1.jpg' You can see that there is a CreateDate generated of the current time and all dates are changed to the current time too. (You explain this) For now the file has a create date.


4. After applying exiftool '-DateTimeOriginal>FileModifyDate' '1.jpg' you can see that an existing CreateDate is changed. With your description the Erstellt = Create should still be "Heute 19:43" from step 3.


And you can't confirm this?
-Mac OSX Mountain Lion-

Phil Harvey

I confirm this.

The reason is that you are trying to set a modification date that is before the creation date.  It seems that the MacOS doesn't like this inconsistency so it changes the creation date too, but only in this case.

Interesting.

If Windows does this too, it gives me a technique for setting the filesystem creation date.

I'll do some testing.  If we get lucky, maybe I can add the ability to write the creation date.  I hadn't thought of this before.  That would be fantastic if it works!

Thanks for providing these details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Hi Phil,

do you have some informations about your testing? Maybe a built in function in "AllDates" to rewrite the CreationDate as well? Also for files with no modification date before the creation date.
Maybe it could check if there is a existing creation date, if not generate it with for example changing the DateTimeOriginal one minute backward and next one minute forward. Now the CreationDate should be the current time. (I don't know what happen to files which already have a creation date. I think it will not be effected. So there is an other way needed.) When there is no CreationDate it is no problem. Changing any date will set the CreationDate to the current date and so DateTimeOriginal>FileModifyDate will change the CurrentDate as well.
-Mac OSX Mountain Lion-

Phil Harvey

Yes, I can set the filesystem creation date indirectly through these steps:

1) rewrite the file (causes filesystem modification and creation dates to be set to the current date/time).

2) set the filesystem modification date to what I want for the creation date.  (This will update both the modification and creation dates.)

3) set the filesystem modification date to some later date.

So this can be done, but unfortunately requires rewriting the file.  I haven't yet tested this to see if it works in Windows.  One big downside is that even though I have a round-about way to effect the creation date, I still have no way to read it.  So even if I implement this it would be a write-only tag.  Adding this to the AllDates shortcut would not be appropriate.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

I will do step 1 and 2. Then I changed all dates to the correct one. I am not interesting in Windows anymore so I can't test it because I have none.

Is there a problem with rewriting the file? Why is this unfortunately? You won't change any data in the file I think.

Is there some tag to rewrite the file without changing anything? Setting time forward and backward is a bit circuitous.

Do you think it is a problem when it is write only? When I change the dates of a jpg I will always change all dates. Exceptionally the Create Date. Everyone associate the Create Date with the Date on which the photo was taken. So it is a very important that this date is the DateTimeOriginal. So for me it is not needed that I can read the Create Date. Or better for a function to change every date it is not needed.

Maybe not "AllDates" but "TrulyAllDates" ;)
-Mac OSX Mountain Lion-

Phil Harvey

Quote from: JanK on November 14, 2011, 04:25:22 PM
Is there a problem with rewriting the file? Why is this unfortunately? You won't change any data in the file I think.

You're right, I don't need to change the file.  But it would be a lot faster if I didn't have to rewrite it.

Quote
Is there some tag to rewrite the file without changing anything?

Currently, no.

QuoteDo you think it is a problem when it is write only?

It is difficult to verify that it was written properly if you can't read it.  Also, people won't know they can change it if they don't see it in the ExifTool output.

QuoteMaybe not "AllDates" but "TrulyAllDates" ;)

Yes, AllDates isn't really all of them.  There are many, many other date/time values in other types of metadata that this won't write, some of which ExifTool doesn't even have the ability to write.  So there never will be a TrulyAllDates tag that you can write.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I just tested this on Windows, and unfortunately it doesn't work as it does in OS X.  So I can't use this trick to add a writable "FileCreationDate" pseudo-tag to ExifTool. :(

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

JanK

Typically Windows! It destroys any good idea.
I set the DateTimeOriginal +1Minute and -1Minute and then DateTimeOriginal>FileModifyDate
That works great an OSX!
-Mac OSX Mountain Lion-