Google photo date issue

Started by descotes, November 25, 2017, 04:56:03 PM

Previous topic - Next topic

descotes

Hi,

I know there's a date issue within Google photo.  Does anyone know what date Google Photo looks at to determine the date so I can make sure that date is updated?  I am trying to learn the exiftool so I can fix the actual photo first before it gets uploaded to Google Photo and it's wrong.

Thanks for any help
Stacy

Phil Harvey

Hi Stacy,

You can try using ExifTool to write a different date to each date/time tag in a file, then open it in Google Photo to see which one is displayed.

- 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 ($).

descotes

Quote from: Phil Harvey on November 25, 2017, 05:19:34 PM
Hi Stacy,

You can try using ExifTool to write a different date to each date/time tag in a file, then open it in Google Photo to see which one is displayed.

- Phil

Do you know how I would do that?

StarGeek

It's been a while since I tested Google Photos and what metatdata it reads, but for images, I suggest updating EXIF:DateTimeOriginal for the date.  There actually is 12 different timestamp tags that Google Photos uses, but that tag is the most common and reliable.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

descotes

Quote from: StarGeek on November 25, 2017, 05:21:42 PM
It's been a while since I tested Google Photos and what metatdata it reads, but for images, I suggest updating EXIF:DateTimeOriginal for the date.  There actually is 12 different timestamp tags that Google Photos uses, but that tag is the most common and reliable.

Thank you.  Do you know how to update one field for one picture?  I've just been randomly trying full codes that I'm seeing on threads.  I don't know what I'm doing with this program.  I'm trying to learn. 

Also do you know how I get it to not make a duplicate file?

descotes

#5
Quote from: StarGeek on November 25, 2017, 05:21:42 PM
It's been a while since I tested Google Photos and what metatdata it reads, but for images, I suggest updating EXIF:DateTimeOriginal for the date.  There actually is 12 different timestamp tags that Google Photos uses, but that tag is the most common and reliable.

Looks like for different files it's different dates that it's picking up.  So I guess I just need to figure out how to be able to change all of the dates

Alan Clifford

I'd start with this command line to see the dates
exiftool -s -G -a -*date* w300_0803.jpg

This give me

[File]          FileModifyDate                  : 2017:11:20 22:15:55-04:00
[File]          FileAccessDate                  : 2017:11:25 20:36:33-04:00
[File]          FileInodeChangeDate             : 2017:11:20 22:15:55-04:00
[EXIF]          ModifyDate                      : 2017:11:20 20:26:36
[EXIF]          DateTimeOriginal                : 2017:11:15 12:45:46
[EXIF]          CreateDate                      : 2017:11:15 12:45:46
[EXIF]          GPSDateStamp                    : 2017:11:15
[XMP]           DateTimeOriginal                : 2017:11:15 12:45:46-04:00
[XMP]           GPSDateTime                     : 2017:11:15 16:45:46
[ICC_Profile]   ProfileDateTime                 : 2009:02:20 17:07:10
[Composite]     GPSDateTime                     : 2017:11:15 16:45:46Z
[Composite]     SubSecCreateDate                : 2017:11:15 12:45:46-04:00
[Composite]     SubSecDateTimeOriginal          : 2017:11:15 12:45:46-04:00
[Composite]     SubSecModifyDate                : 2017:11:20 20:26:36-04:00



Ignore the [composite]s as they are generated by exiftool and don't exist
Ignore the [file]s as they are the file system dates
Ignore the [icc_profile]
You probably don't have any xmp:stuff
You probably don't have an exif:gpsdatestamp

Take a copy of your file so you don't destroy anything in the orginal.

You wanted one-by-one and no backup file so here goes.  Slightly change each of the three remaining dates (or whatever you have)

exiftool -overwrite_original -datetimeoriginal="2017:11:16 12:45:46" w300_0803.jpg

Repeat with a different change for each date.  See which one google uses.

Please note I had two [datetimeoriginal]s.  Exiftool does choose the exif version first but, to be sure, I'd use

... -exif:datetimeoriginal="2017:11:16 12:45:46" ....

You can look up what "-s -G -a" mean by typing

exiftool 

by itself on the command line.

descotes

Thank you so much for writing!

I am trying to get a hang of this.  If I have to do each file individually then I will.  Id rather not but I will.

I have some photos that are have full names/descriptions like 1987-12-15 – Christmas and some photos that are have partial names/descriptions like 1980-xx-xx – Banquet  or 1973-12-xx – Banquet

I want all of the dates to be the FileName.  If there are xx's it can be substituted for 01 or something general

It looks like Google Photo goes by the File Modification Date/Time possibly so this field is important to change.

So when I looked at one of my files with the exiftool –time:all –G1 –a –s command the filename was 1950-xx-xx – Family.jpg and these were the dates:

File Modification Date/Time:    2017:11:25  14:02:53-5:00
File Access Date/Time:       2017:11:25  14:02:53-5:00
File Creation Date/Time:    2016:06:09  21:41:49-4:00
Modify Date:          1970:00:00  00:00:00
Date/Time Original:      1970:00:00  00:00:00
Create Date:          1970:00:00  00:00:00
Metadata Date:         2016:12:15  23:03:48-5:00

Then I used this command: exiftool "-alldates<${filename} 00:00:00" and it updated the file a little.  I thought it would update all the dates.  Now the dates are:
File Modification Date/Time:    2017:11:25  18:40:26-5:00
File Access Date/Time:       2017:11:25  18:40:26-5:00
File Creation Date/Time:    2016:06:09  21:41:49-4:00
Modify Date:          1950:00:00  00:00:00
Date/Time Original:      1950:00:00  00:00:00
Create Date:          1950:00:00  00:00:00
Metadata Date:         2016:12:15  23:03:48-5:00

So the date I needed to change File Modification Date/Time didn't change.  So then I went to this command exiftool "-filemodifydate<${filename} 00:00:00" and I got a message saying Warning: No writable tags set.  Can you tell me what I did wrong?

Alan Clifford

Quote from: descotes on November 25, 2017, 10:10:48 PM

So the date I needed to change File Modification Date/Time didn't change.  So then I went to this command exiftool "-filemodifydate<${filename} 00:00:00" and I got a message saying Warning: No writable tags set.  Can you tell me what I did wrong?

I can think of three things you could look at.  Does your filing system accept dates in the 1950's?  Does it accept a month zero?  Does it accept a day zero?


Phil Harvey

Quoteexiftool "-alldates<${filename} 00:00:00"

This command will only work if the file name has enough numbers to give a year, month, day (4 digits then 2 digits then 2 digits).  So it should work for the files with a full date in the name.

For others, you will have to add a month and day.

Try this:

exiftool "-alldates<${filename}:01:01 00:00:00" "-alldates<${filename}:01 00:00:00" "-alldates<${filename} 00:00:00" FILE

Note that AllDates sets only DateTimeOriginal, CreateDate and ModifyDate.  If you want to set others (like FileModifyDate), you can repeat the above arguments for any other date/time tags you want to set.

And Alan is correct.  It may not work for dates before 1970.  Add the -v option to see any warnings if it doesn't work.

- 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 ($).

descotes

#10
Quote from: Phil Harvey on November 26, 2017, 09:26:11 AM
Quoteexiftool "-alldates<${filename} 00:00:00"

This command will only work if the file name has enough numbers to give a year, month, day (4 digits then 2 digits then 2 digits).  So it should work for the files with a full date in the name.

For others, you will have to add a month and day.

Try this:

exiftool "-alldates<${filename}:01:01 00:00:00" "-alldates<${filename}:01 00:00:00" "-alldates<${filename} 00:00:00" FILE

Note that AllDates sets only DateTimeOriginal, CreateDate and ModifyDate.  If you want to set others (like FileModifyDate), you can repeat the above arguments for any other date/time tags you want to set.

And Alan is correct.  It may not work for dates before 1970.  Add the -v option to see any warnings if it doesn't work.

- Phil

Thanks Phil.  That long string didn't seem to do anything.  I think I would have to add numbers to all the xx's for it to work

Is there a code I can use to put in my own date?  like instead of filename I can put in my own date for it to change to for the ones with the xx?

descotes

Quote from: Alan Clifford on November 25, 2017, 07:59:36 PM
I'd start with this command line to see the dates
exiftool -s -G -a -*date* w300_0803.jpg

This give me

[File]          FileModifyDate                  : 2017:11:20 22:15:55-04:00
[File]          FileAccessDate                  : 2017:11:25 20:36:33-04:00
[File]          FileInodeChangeDate             : 2017:11:20 22:15:55-04:00
[EXIF]          ModifyDate                      : 2017:11:20 20:26:36
[EXIF]          DateTimeOriginal                : 2017:11:15 12:45:46
[EXIF]          CreateDate                      : 2017:11:15 12:45:46
[EXIF]          GPSDateStamp                    : 2017:11:15
[XMP]           DateTimeOriginal                : 2017:11:15 12:45:46-04:00
[XMP]           GPSDateTime                     : 2017:11:15 16:45:46
[ICC_Profile]   ProfileDateTime                 : 2009:02:20 17:07:10
[Composite]     GPSDateTime                     : 2017:11:15 16:45:46Z
[Composite]     SubSecCreateDate                : 2017:11:15 12:45:46-04:00
[Composite]     SubSecDateTimeOriginal          : 2017:11:15 12:45:46-04:00
[Composite]     SubSecModifyDate                : 2017:11:20 20:26:36-04:00



Ignore the [composite]s as they are generated by exiftool and don't exist
Ignore the [file]s as they are the file system dates
Ignore the [icc_profile]
You probably don't have any xmp:stuff
You probably don't have an exif:gpsdatestamp

Take a copy of your file so you don't destroy anything in the orginal.

You wanted one-by-one and no backup file so here goes.  Slightly change each of the three remaining dates (or whatever you have)

exiftool -overwrite_original -datetimeoriginal="2017:11:16 12:45:46" w300_0803.jpg

Repeat with a different change for each date.  See which one google uses.

Please note I had two [datetimeoriginal]s.  Exiftool does choose the exif version first but, to be sure, I'd use

... -exif:datetimeoriginal="2017:11:16 12:45:46" ....

You can look up what "-s -G -a" mean by typing

exiftool 

by itself on the command line.

Alan you mentioned to ignore the [file] dates but I think that's what Google photos is looking at.  Is there a reason I should ignore them or not change them?

Alan Clifford

Quote from: descotes on November 26, 2017, 03:35:55 PM

Alan you mentioned to ignore the [file] dates but I think that's what Google photos is looking at.  Is there a reason I should ignore them or not change them?

The [file] dates are not part of the meta data stored in the photograph file itself;  they are stored by and on the disk operating system of your computer.  I was assuming that google photos is storage in the "cloud", i.e. on someone else's computer, and that the file dates would not be transferred from one computer to another.  My assumptions could be wrong.

I find it strange that any file storage service would use the dates from another system as such dates are so ephemeral.  Apologies if I have given bad advice.


StarGeek

As I previously said, EXIF:DateTimeOriginal is the best tag to copy to for this purpose.  If you copy to Alldates as in your example then your good, as EXIF:DateTimeOriginal is part of Alldates.

Google Photos will use System:FileModifyDate as the date (no idea how, some javascript magic I assume) but there are 11 other time tags that have priority and would be used before the System:FileModifyDate.

I do have to say that I only tested jpgs, but I don't think tiffs would be different.  No idea about videos.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

MadMax

I tested a video upload to Google Photos.  In my video, which was a .mov file, I had the types of dates listed below.  From those choices, Google Photos used the [XMP] Create Date.  Just FYI.   ;)

[File]          FileModifyDate                 
[File]          FileAccessDate                 
[File]          FileInodeChangeDate            
[QuickTime]     TrackCreateDate                
[QuickTime]     TrackModifyDate                
[QuickTime]     MediaCreateDate                
[QuickTime]     MediaModifyDate                
[XMP]           DateTimeOriginal               
[XMP]           CreateDate                     
[XMP]           ModifyDate   

StarGeek

You're listing is missing the Quicktime:CreateDate.  If you add -a to your command, it will show up and probably be the same as the XMP:CreateDate.

I'm uploading a MOV file with an XMP:CreateDate that is different from the Quicktime:CreateDate to see which has priority. 

Interesting.  In my file, XMP:MetadataDate had priority over both of the CreateDate tags.  I'll have to do more research, but with a smaller file as my test MOV file is 236 megs and not the best for repeated uploads.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).