set file timestamps from "Creation Date"

Started by gigel, October 23, 2017, 05:12:50 PM

Previous topic - Next topic

gigel

I have lots of mp4 recorded on different timezones. The tool that transferred from phone to pc got the wrong file date/time/timezone.

exif "Creation Date" looks like this
Creation Date                   : 2017:08:21 12:56:07-05:00

I have tried to set file creation/modify date from Creation Date like this:

#exiftool "-FileCreateDate<CreationDate" "-FileModifyDate<CreationDate" IMG_2975.mp4
Warning: This tag is Windows only in File:FileCreateDate (ValueConvInv) - IMG_2975.mp4
    1 image files updated

but the resulting date is different than what I expected:

# stat IMG_2975.mp4
  File: 'IMG_2975.mp4'
  Size: 43899324        Blocks: 85825      IO Block: 131072 regular file
Device: 54h/84d Inode: 75851       Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1003/  tonido)   Gid: ( 1000/   retea)
Access: 2017-08-21 20:56:07.000000000 +0300
Modify: 2017-08-21 20:56:07.000000000 +0300
Change: 2017-10-24 00:03:55.139397520 +0300
Birth: -

my /etc/localtime is GMT+2 (DST is in effect)

The time that I wish to be effectively set to the filename when I `stat` it is "2017:08:21 12:56:07"
(basically I want the file to appear as if taken at midday in my timezone, not at midday in the original timezone, so when I look at them to see them in the file manager with the time of that day as it was on that place, even if they are stored in my local time filesystem)

Is there a simple one-button way without taking each set of files that are on a particular timezone and applying time shifting?

Thank you!

StarGeek

Try
exiftool  "-FileModifyDate<${CreationDate;s/[-+z].*$//" FileOrDir

I removed the FileCreateDate part because, as the error says, that only applies to a Windows OS.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype