I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-07-13 05:50:08-07 by justin
Problem Setting FileModifyDate

I'm having a problem setting the fileModifyDate on a dozen or so files. Please see the example output below and notice that the hour in the fileModifyDate is one hour in front of all the other settings. This behavoir is the same in reverse - if I use the fileModifyDate to set the createDate, it loses an hour.

D:\Photos\Library\2006\03\26>exiftool -EXIF:alldates -filemodifydate -G1 2006-03 -26_D50_DSC_0549.JPG [ExifIFD] Date/Time Original : 2006:03:26 10:31:13 [ExifIFD] Create Date : 2006:03:26 10:31:13 [IFD0] Modify Date : 2006:03:26 10:31:13 [File] File Modification Date/Time : 2006:03:26 11:31:13 D:\Photos\Library\2006\03\26>exiftool "-FileModifyDate<ExifIFD:CreateDate" 2006- 03-26_D50_DSC_0549.JPG 1 image files updated D:\Photos\Library\2006\03\26>exiftool -EXIF:alldates -filemodifydate -G1 2006-03 -26_D50_DSC_0549.JPG [ExifIFD] Date/Time Original : 2006:03:26 10:31:13 [ExifIFD] Create Date : 2006:03:26 10:31:13 [IFD0] Modify Date : 2006:03:26 10:31:13 [File] File Modification Date/Time : 2006:03:26 11:31:13 D:\Photos\Library\2006\03\26>

I have tried looking for some kind of timezone offset but can not see one in the meta output?

As an aside, is it possible to set the file create date using EXIFTOOL?

Direct Responses: 8285 | Write a response
Posted on 2008-07-13 08:34:21-07 by justin in response to 8284
Re: Problem Setting FileModifyDate
Just some further info on this...I notice that the files in question were taken on the first day of daylight savings time in the UK in both 2006 and 2007 with my Nikon D50 camera. No other files taken with the same camera have this problem.
Direct Responses: 8286 | Write a response
Posted on 2008-07-13 11:38:43-07 by exiftool in response to 8285
Re: Problem Setting FileModifyDate
Interesting. It would appear that Windows and Perl disagree about the date when daylight savings time started. I assume you are using the Windows exe version of exiftool? If so, it uses Perl 5.8. Perhaps if I updated to a more recent version of Perl it would fix this. I will look into it. Until then, try shifting the filemodifydate back by one hour on these files with -filemodifydate-=1. There is no platform-independent way to set the create date in Perl, so exiftool can not do this. - Phil
Direct Responses: 8287 | Write a response
Posted on 2008-07-13 15:25:04-07 by justin in response to 8286
Re: Problem Setting FileModifyDate

Yes I am using the windows .exe version of Exiftool. Could it be that my version of Windows is set to UK daylight savings settings and maybe Pearl is using US?

I have tried to bring back the filemodifydate by one hour as suggested by no joy. Perhaps I'm doing something wrong?

D:\Photos>exiftool -alldates -fileModifyDate -s -G1 D:\Photos\Library\2006\03\26 \* ======== D:\Photos\Library\2006\03\26\2006-03-26_D50_DSC_0549.JPG [ExifIFD] DateTimeOriginal : 2006:03:26 10:31:13 [ExifIFD] CreateDate : 2006:03:26 10:31:13 [IFD0] ModifyDate : 2006:03:26 10:31:13 [File] FileModifyDate : 2006:03:26 11:31:13 14 image files read D:\Photos>exiftool "-fileModifyDate-=1" D:\Photos\Library\2006\03\26\* -r -ov erwrite_original 0 image files updated 14 image files unchanged D:\Photos>exiftool -alldates -fileModifyDate -s -G1 D:\Photos\Library\2006\03\26 \* ======== D:\Photos\Library\2006\03\26\2006-03-26_D50_DSC_0549.JPG [ExifIFD] DateTimeOriginal : 2006:03:26 10:31:13 [ExifIFD] CreateDate : 2006:03:26 10:31:13 [IFD0] ModifyDate : 2006:03:26 10:31:13 [File] FileModifyDate : 2006:03:26 11:31:13 14 image files read
Justin..
Direct Responses: 8288 | Write a response
Posted on 2008-07-13 16:44:31-07 by exiftool in response to 8287
Re: Problem Setting FileModifyDate
Now I have a couple more mysteries to deal with. First, I hope you deleted the output from the other 13 files in the first and last commands because otherwise I don't understand where it went.

Second, your 2nd command should work fine to change the filemodifydate. I even broke out the Windows box here and tested this exact command and it works fine for me. Try using the -v3 option to see if that sheds any more light on the subject (you should get an indication that exiftool is shifting FileModifyDate, and a list of the files that it reads).

Also, the -overwrite_original option is not necessary when just writing filemodifydate since this is a "pseudo" tag which doesn't require rewriting of the file.

- Phil
Direct Responses: 8289 | Write a response
Posted on 2008-07-13 20:06:07-07 by justin in response to 8288
Re: Problem Setting FileModifyDate

Hi Phil, yes I did delete the other 13 results to keep the post smaller. As you suspected the problem was a pearl/windows DST issue, I used XnView to set the file modified date on the jpg files I was working on earlier. However, it could not cope with the 3 NEF files I have from 2007 so I have performed the tests you suggested and the results are below:

D:\Photos\Library\2007\03\25>exiftool -alldates -fileModifyDate -s -G1 * ======== 2007-03-25_D50_DSC_4513.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:16 [ExifIFD] CreateDate : 2007:03:25 18:35:16 [IFD0] ModifyDate : 2007:03:25 18:35:16 [File] FileModifyDate : 2007:03:25 19:35:16 ======== 2007-03-25_D50_DSC_4514.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:37 [ExifIFD] CreateDate : 2007:03:25 18:35:37 [IFD0] ModifyDate : 2007:03:25 18:35:37 [File] FileModifyDate : 2007:03:25 19:35:37 ======== 2007-03-25_D50_DSC_4515.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:59 [ExifIFD] CreateDate : 2007:03:25 18:35:59 [IFD0] ModifyDate : 2007:03:25 18:35:59 [File] FileModifyDate : 2007:03:25 19:35:59 3 image files read D:\Photos\Library\2007\03\25>exiftool "-filemodifydate-=1" -v3 * Shifting File:FileModifyDate if tag exists ======== 2007-03-25_D50_DSC_4513.NEF ======== 2007-03-25_D50_DSC_4514.NEF ======== 2007-03-25_D50_DSC_4515.NEF 0 image files updated 3 image files unchanged D:\Photos\Library\2007\03\25>exiftool -alldates -fileModifyDate -s -G1 * ======== 2007-03-25_D50_DSC_4513.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:16 [ExifIFD] CreateDate : 2007:03:25 18:35:16 [IFD0] ModifyDate : 2007:03:25 18:35:16 [File] FileModifyDate : 2007:03:25 19:35:16 ======== 2007-03-25_D50_DSC_4514.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:37 [ExifIFD] CreateDate : 2007:03:25 18:35:37 [IFD0] ModifyDate : 2007:03:25 18:35:37 [File] FileModifyDate : 2007:03:25 19:35:37 ======== 2007-03-25_D50_DSC_4515.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:59 [ExifIFD] CreateDate : 2007:03:25 18:35:59 [IFD0] ModifyDate : 2007:03:25 18:35:59 [File] FileModifyDate : 2007:03:25 19:35:59 3 image files read D:\Photos\Library\2007\03\25>

Many thanks for your help! Justin..

Direct Responses: 8291 | Write a response
Posted on 2008-07-14 00:16:46-07 by exiftool in response to 8289
Re: Problem Setting FileModifyDate
Thanks. That looks good but for some reason it works for me but not you. What exiftool version are you using, and what operating system? I was using exiftool.exe 7.36 and Windows XP service pack 2.
Direct Responses: 8292 | Write a response
Posted on 2008-07-14 06:29:10-07 by justin in response to 8291
Re: Problem Setting FileModifyDate
I'm using Exiftool 7.36 and Windows XP Pro service pack 3. I'll see if I can ask my wife to email the three files to me at work and I'll perform some more tests on another computer.
Direct Responses: 8293 | Write a response
Posted on 2008-07-14 08:41:36-07 by justin in response to 8292
Re: Problem Setting FileModifyDate

Hi Phil, right, SWMBO has emailed me the files in question and I have performed the tests below. My work computer is also a windows XP pro sp3 machine and I'm using exiftool 7.36. However note that I can successfully shift the filemodifydate by one hour prior to setting it to the exif createdate. Only after that operation can I no longer shift the filemodifydate:

C:\nefs>exiftool -alldates -fileModifyDate -s -G1 * ======== 2007-03-25_D50_DSC_4513.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:16 [ExifIFD] CreateDate : 2007:03:25 18:35:16 [IFD0] ModifyDate : 2007:03:25 18:35:16 [File] FileModifyDate : 2008:07:14 10:01:57 ======== 2007-03-25_D50_DSC_4514.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:37 [ExifIFD] CreateDate : 2007:03:25 18:35:37 [IFD0] ModifyDate : 2007:03:25 18:35:37 [File] FileModifyDate : 2008:07:14 10:02:07 ======== 2007-03-25_D50_DSC_4515.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:59 [ExifIFD] CreateDate : 2007:03:25 18:35:59 [IFD0] ModifyDate : 2007:03:25 18:35:59 [File] FileModifyDate : 2008:07:14 10:02:02 3 image files read C:\nefs>exiftool "-fileModifyDate-=1" * -v3 Shifting File:FileModifyDate if tag exists ======== 2007-03-25_D50_DSC_4513.NEF + FileModifyDate = '1216022517' ======== 2007-03-25_D50_DSC_4514.NEF + FileModifyDate = '1216022527' ======== 2007-03-25_D50_DSC_4515.NEF + FileModifyDate = '1216022522' 3 image files updated C:\nefs>exiftool -alldates -fileModifyDate -s -G1 * ======== 2007-03-25_D50_DSC_4513.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:16 [ExifIFD] CreateDate : 2007:03:25 18:35:16 [IFD0] ModifyDate : 2007:03:25 18:35:16 [File] FileModifyDate : 2008:07:14 09:01:57 ======== 2007-03-25_D50_DSC_4514.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:37 [ExifIFD] CreateDate : 2007:03:25 18:35:37 [IFD0] ModifyDate : 2007:03:25 18:35:37 [File] FileModifyDate : 2008:07:14 09:02:07 ======== 2007-03-25_D50_DSC_4515.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:59 [ExifIFD] CreateDate : 2007:03:25 18:35:59 [IFD0] ModifyDate : 2007:03:25 18:35:59 [File] FileModifyDate : 2008:07:14 09:02:02 3 image files read C:\nefs>exiftool "-fileModifyDate<createdate" * -v3 ======== 2007-03-25_D50_DSC_4513.NEF Setting new values from 2007-03-25_D50_DSC_4513.NEF Writing File:FileModifyDate + FileModifyDate = '1174847716' ======== 2007-03-25_D50_DSC_4514.NEF Setting new values from 2007-03-25_D50_DSC_4514.NEF Writing File:FileModifyDate + FileModifyDate = '1174847737' ======== 2007-03-25_D50_DSC_4515.NEF Setting new values from 2007-03-25_D50_DSC_4515.NEF Writing File:FileModifyDate + FileModifyDate = '1174847759' 3 image files updated C:\nefs>exiftool -alldates -fileModifyDate -s -G1 * ======== 2007-03-25_D50_DSC_4513.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:16 [ExifIFD] CreateDate : 2007:03:25 18:35:16 [IFD0] ModifyDate : 2007:03:25 18:35:16 [File] FileModifyDate : 2007:03:25 19:35:16 ======== 2007-03-25_D50_DSC_4514.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:37 [ExifIFD] CreateDate : 2007:03:25 18:35:37 [IFD0] ModifyDate : 2007:03:25 18:35:37 [File] FileModifyDate : 2007:03:25 19:35:37 ======== 2007-03-25_D50_DSC_4515.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:59 [ExifIFD] CreateDate : 2007:03:25 18:35:59 [IFD0] ModifyDate : 2007:03:25 18:35:59 [File] FileModifyDate : 2007:03:25 19:35:59 3 image files read C:\nefs>exiftool "-fileModifyDate-=1" * -v3 Shifting File:FileModifyDate if tag exists ======== 2007-03-25_D50_DSC_4513.NEF ======== 2007-03-25_D50_DSC_4514.NEF ======== 2007-03-25_D50_DSC_4515.NEF 0 image files updated 3 image files unchanged C:\nefs>exiftool -alldates -fileModifyDate -s -G1 * ======== 2007-03-25_D50_DSC_4513.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:16 [ExifIFD] CreateDate : 2007:03:25 18:35:16 [IFD0] ModifyDate : 2007:03:25 18:35:16 [File] FileModifyDate : 2007:03:25 19:35:16 ======== 2007-03-25_D50_DSC_4514.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:37 [ExifIFD] CreateDate : 2007:03:25 18:35:37 [IFD0] ModifyDate : 2007:03:25 18:35:37 [File] FileModifyDate : 2007:03:25 19:35:37 ======== 2007-03-25_D50_DSC_4515.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:59 [ExifIFD] CreateDate : 2007:03:25 18:35:59 [IFD0] ModifyDate : 2007:03:25 18:35:59 [File] FileModifyDate : 2007:03:25 19:35:59 3 image files read C:\nefs>

Note that the problem with the hour difference between the createdate and the filemodfiydate still exists.

It's almost like once I have set the filemodifydate to the createdate, exiftool can no longer see the filemodifydate tag (in write mode). Having thought about this for a minute, I decided to try and manually set one of the images to the correct time:

C:\nefs>exiftool "-fileModifyDate=2007:03:25 18:35:59" *4515.NEF -v3 Writing File:FileModifyDate ======== 2007-03-25_D50_DSC_4515.NEF + FileModifyDate = '1174847759' 1 image files updated C:\nefs>exiftool -alldates -fileModifyDate -s -G1 *4515.NEF [ExifIFD] DateTimeOriginal : 2007:03:25 18:35:59 [ExifIFD] CreateDate : 2007:03:25 18:35:59 [IFD0] ModifyDate : 2007:03:25 18:35:59 [File] FileModifyDate : 2007:03:25 19:35:59 C:\nefs>

Notice that the data has been writen but the DST issue still exists. Justin..

Direct Responses: 8295 | Write a response
Posted on 2008-07-14 11:22:09-07 by exiftool in response to 8293
Re: Problem Setting FileModifyDate
Hi Justin,

This narrows it down a bit, thanks. I try repeating these steps with my system tonight. My only guess is that somehow the date/time routines are seeing this as an invalid date after you change it, and so aren't setting the date/time properly. I'll check this. Keep in mind that the FileModifyDate isn't stored in the file, but is part of the filesystem. So the file itself is not changed when you set FileModifyDate.
Direct Responses: 8324 | Write a response
Posted on 2008-07-16 07:06:32-07 by justin in response to 8295
Re: Problem Setting FileModifyDate
Hi Phil, I just wondered if you got chance to try reproducing the result of the testing I did on this?
Direct Responses: 8329 | Write a response
Posted on 2008-07-16 10:42:21-07 by exiftool in response to 8324
Re: Problem Setting FileModifyDate
Ooops. Thanks for reminding me, I had forgotten to do this. I'll try to remember to drag out the PC tonight.

- Phil
Direct Responses: 8330 | Write a response
Posted on 2008-07-16 14:03:06-07 by justin in response to 8329
Re: Problem Setting FileModifyDate
No probs at all Phil. I felt guilty 'chasing you up' because the support you provide for your userbase through this forum is magnificent and way beyond the call of duty. Once again, thanks for all your help!
Direct Responses: 8339 | Write a response
Posted on 2008-07-17 00:41:42-07 by exiftool in response to 8330
Re: Problem Setting FileModifyDate
Cool. PC's are wonderful. ;)

I've managed to reproduce your problem. The problem disappears if you turn off "Automatically adjust clock for daylight savings time" in your Date and Time settings. Maybe this is the best "solution" to the problem.

With this setting on, writing the FileModifyDate of "2007:03:25 18:35:16" results in a time that is 1 hour too late. And to be absolutely consistent in this inconsistency, subtracting an hour from this time does nothing (as you observed). This is because exiftool subtracts an hour but Windows adds it back again, so nothing is done. To actually subtract one hour from this time, you need to subtract two hours on the command line. Remember, I did say that PC's are wonderful!

I haven't looked at my code in detail, but I suspect there is nothing I can do to fix this. It is just some weird inconsistency in the way that daylight savings time is handled in your time zone. When I set my computer back to Eastern Daylight time, this problem does not occur on the day when daylight savings time started in this time zone (2007:03:11), except if I try to set an invalid time like 02:30:00. But this is to be expected because local time 02:30:00 doesn't exist on this day since the clocks here jump forward from 02:00:00 to 03:00:00 at the start of DST. For other times before 02:00:00 and after 03:00:00 on this date, the FileModifyDate can be set as expected.

In your time zone, the jump occurs from 01:00:00 to 02:00:00 on 2007:03:25, so setting times in this range will do funny things. But your times are around 18:00, so I don't see why there should be a problem, but there is.

- Phil
Direct Responses: 8347 | Write a response
Posted on 2008-07-18 00:30:32-07 by exiftool in response to 8339
Re: Problem Setting FileModifyDate
I did some more testing with various versions of Perl, and this problem goes away if I update to a more recent version of ActivePerl. I will do some more testing with this version to be sure it doesn't cause any problems, and bundle it with the next Windows version of exiftool (version 7.38) if everything goes OK.

- Phil
Direct Responses: 8349 | Write a response
Posted on 2008-07-18 11:15:00-07 by justin in response to 8347
Re: Problem Setting FileModifyDate

Hi Phil, I got round to testing with the "auto adjust for daylight savings" turned off with the following results:

C:\nefs>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2008:07:14 16:02:49 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2008:07:14 16:02:49 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2008:07:14 16:02:49 ======== DSC_1056.NEF Date/Time Original : 2008:06:18 15:10:17 Create Date : 2008:06:18 15:10:17 Modify Date : 2008:06:18 15:10:17 File Modification Date/Time : 2008:06:18 16:10:20 4 image files read C:\nefs>exiftool "-filemodifydate<createdate" * 4 image files updated C:\nefs>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2007:03:25 19:35:16 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2007:03:25 19:35:37 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2007:03:25 19:35:59 ======== DSC_1056.NEF Date/Time Original : 2008:06:18 15:10:17 Create Date : 2008:06:18 15:10:17 Modify Date : 2008:06:18 15:10:17 File Modification Date/Time : 2008:06:18 15:10:17 4 image files read C:\nefs>exiftool -filemodifydate-=1 * 1 image files updated 3 image files unchanged C:\nefs>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2007:03:25 19:35:16 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2007:03:25 19:35:37 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2007:03:25 19:35:59 ======== DSC_1056.NEF Date/Time Original : 2008:06:18 15:10:17 Create Date : 2008:06:18 15:10:17 Modify Date : 2008:06:18 15:10:17 File Modification Date/Time : 2008:06:18 14:10:17 4 image files read ***** AT THIS POINT I DISABLED "AUTOMATICALLY ADJUST FOR DAYLIGHT SAVINGS" ***** C:\nefs>exiftool -filemodifydate-=1 * 4 image files updated C:\nefs>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2007:03:25 17:35:16 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2007:03:25 17:35:37 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2007:03:25 17:35:59 ======== DSC_1056.NEF Date/Time Original : 2008:06:18 15:10:17 Create Date : 2008:06:18 15:10:17 Modify Date : 2008:06:18 15:10:17 File Modification Date/Time : 2008:06:18 12:10:17 4 image files read C:\nefs>

Note that with the "auto adjust" turned off, all the times change by 2 hours! This has left me scratching my head a little. Looks like the later version of Pearl may be worthy of consideration.

Direct Responses: 8351 | 8551 | Write a response
Posted on 2008-07-18 12:17:57-07 by exiftool in response to 8349
Re: Problem Setting FileModifyDate
There is certainly something I still don't understand about the behavour, but since it appears to be a bug in ActivePerl 5.8.7, I'm not going to spend any more time trying to figure it out.

Instead, I'm pursuing the Perl upgrade path, but after a number of hours trying to get the PAR packager working with the updated Perl, I still haven't got it running yet. So this may take a while. I'll let you know when I have something ready.

- Phil
Direct Responses: 8353 | Write a response
Posted on 2008-07-18 14:31:30-07 by justin in response to 8351
Re: Problem Setting FileModifyDate

Thanks Phil. If you would like me to do any more testing at any stage I'd be more than happy to oblige

Direct Responses: 8359 | Write a response
Posted on 2008-07-18 17:10:10-07 by exiftool in response to 8353
Re: Problem Setting FileModifyDate
I've got something for you to try out:

exiftool-7.38.zip

This is the same as version 7.37, but bundled with Perl 5.10.0 instead of Perl 5.8.7. I'm not 100% happy with this for two reasons:

1) Modules that should be included automatically in the package aren't, so I have to load them explicitly at run time which increases the time needed to launch exiftool by a small bit. (I hope to figure out a way around this.)

2) The new perl is bigger, so the zip file is about 2.4 MB now instead of 1.9 MB. But I knew this would happen and there is no way around it.

However, it does seem to fix the DST problem in my tests.

- Phil
Direct Responses: 8360 | Write a response
Posted on 2008-07-18 19:51:26-07 by justin in response to 8359
Re: Problem Setting FileModifyDate

Hi Phil, it looks like you've cracked it! Below, I have tested both setting the -filemodifydate from the -createdate and shifting the -filemodifydate back and forward one hour - all with DST enabled on my machine. As far as I can tell it looks perfect!

D:\Photos\Library\2007\03\25>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2007:03:25 19:35:16 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2007:03:25 19:35:37 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2007:03:25 19:35:59 3 image files read D:\Photos\Library\2007\03\25>exiftool "-filemodifydate<createdate" * 3 image files updated D:\Photos\Library\2007\03\25>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2007:03:25 18:35:16 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2007:03:25 18:35:37 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2007:03:25 18:35:59 3 image files read D:\Photos\Library\2007\03\25>exiftool -filemodifydate-=1 * 3 image files updated D:\Photos\Library\2007\03\25>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2007:03:25 17:35:16 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2007:03:25 17:35:37 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2007:03:25 17:35:59 3 image files read D:\Photos\Library\2007\03\25>exiftool -filemodifydate+=1 * 3 image files updated D:\Photos\Library\2007\03\25>exiftool -alldates -filemodifydate * ======== 2007-03-25_D50_DSC_4513.NEF Date/Time Original : 2007:03:25 18:35:16 Create Date : 2007:03:25 18:35:16 Modify Date : 2007:03:25 18:35:16 File Modification Date/Time : 2007:03:25 18:35:16 ======== 2007-03-25_D50_DSC_4514.NEF Date/Time Original : 2007:03:25 18:35:37 Create Date : 2007:03:25 18:35:37 Modify Date : 2007:03:25 18:35:37 File Modification Date/Time : 2007:03:25 18:35:37 ======== 2007-03-25_D50_DSC_4515.NEF Date/Time Original : 2007:03:25 18:35:59 Create Date : 2007:03:25 18:35:59 Modify Date : 2007:03:25 18:35:59 File Modification Date/Time : 2007:03:25 18:35:59 3 image files read D:\Photos\Library\2007\03\25>

I understand that moving to a new version of Pearl is not to be taken lightly but in this case, it does seem to resolve the problem. Many thanks for all your help. Justin..

Direct Responses: 8363 | Write a response
Posted on 2008-07-19 09:57:56-07 by exiftool in response to 8360
Re: Problem Setting FileModifyDate
Hi Justin,

Thanks for testing this. Please let me know if you have any problems. I think I have come up with a solution for the module loading problem that won't slow things down, but I have to test it out. If it works, version 7.39 will use this technique. Until then, I have made the 7.38 Windows version public for other people to test out.

- Phil
Direct Responses: Write a response
Posted on 2008-08-13 20:30:33-07 by red4 in response to 8349
Re: Problem Setting FileModifyDate
I've got the same problem really, trying to put an EXIF date tag into some photos that don't have any. exiftool appears to be showing local timezone shifted times. Perl 5.10.0.1003 and exiftool 7.39 Trying to execute this "exiftool.pl "-DateTimeOriginal<filemodifydate" Image025.jpg" Which does indeed work, but records an offset time in the resulting file.
Direct Responses: 8576 | Write a response
Posted on 2008-08-15 12:21:36-07 by exiftool in response to 8551
Re: Problem Setting FileModifyDate
So it looks like 5.10 didn't solve all the problems.

Red4: what is your time zone? Is the problem the same for exiftool 7.37? Does the problem go away if you turn off "Automatically adjust clock for daylight savings time" in your Date and Time settings?

Thanks for any help you can provide.

- Phil
Direct Responses: 8579 | Write a response
Posted on 2008-08-15 19:49:49-07 by red4 in response to 8576
Re: Problem Setting FileModifyDate
Quick answer: turning off "Automatically adjust clock for Daylight Savint Time" in Vista fixes all the time problems that I've been seeing for the last few days! OK, I've been experimenting for a while, I think exiftool is working fine on 5.10. I was initially running Perl 5.8 but had problems so switched to 5.10 and I think I've tracked down the culprit to be Windows Vista! Sorry Phil! Because I ended up chasing my tail for a bit, I decided to take four test photos with known times on my camera and see what ended up. My camera also has a Daylight Saving time setting, which I believe is superfluous to this, but just wanted to make sure I controlled all the variables. So I set the cameras clock to 2030 each time and once in summer and once in winter; repeated for Daylight saving time for completeness. Notice how Vista shifts the time by an hour in winter time! The other peculiar effect I've discovered, is that Vista also shifts the File Modification Date/Time by an hour if the file is copied from the camera during winter time (or when Vistas local clock is set to winter time). Is the solution to leave "Automatically adjust clock for Daylight Savint Time" turned off and manually change Vista's clock twice a year? Such a pain!! IMG_1166.JPG: ============ Set on camera: 15.08.2008 2030 Daylight saving time ON exiftool.pl: File Modification Date/Time : 2008:08:15 20:30:12 Date/Time Original : 2008:08:15 20:30:13 Create Date : 2008:08:15 20:30:13 Modify Date : 2008:08:15 20:30:13 Photoshop: exif:DateTimeOriginal: 2008-08-15T20:30:13+01:00 Vista Date Taken: 15/08/2008 20:30 IMG_1167.JPG: ============ Set on camera: 15.11.2008 2030 Daylight saving time ON exiftool.pl: File Modification Date/Time : 2008:11:15 20:30:04 Date/Time Original : 2008:11:15 20:30:05 Create Date : 2008:11:15 20:30:05 Modify Date : 2008:11:15 20:30:05 Photoshop: exif:DateTimeOriginal: 2008-11-15T20:30:05Z Vista Date Taken: 15/11/2008 21:30 IMG_1168.JPG: ============ Set on camera: 15.08.2008 2030 Daylight saving time OFF exiftool.pl: File Modification Date/Time : 2008:08:15 20:30:04 Date/Time Original : 2008:08:15 20:30:05 Create Date : 2008:08:15 20:30:05 Modify Date : 2008:08:15 20:30:05 Photoshop: exif:DateTimeOriginal: 2008-08-15T20:30:05+01:00 Vista Date Taken: 15/08/2008 20:30 IMG_1169.JPG: ============ Set on camera: 15.11.2008 2030 Daylight saving time OFF exiftool.pl: File Modification Date/Time : 2008:11:15 20:30:04 Date/Time Original : 2008:11:15 20:30:04 Create Date : 2008:11:15 20:30:04 Modify Date : 2008:11:15 20:30:04 Photoshop: exif:DateTimeOriginal: 2008-11-15T20:30:04Z Vista Date Taken: 15/11/2008 21:30
Direct Responses: 8595 | Write a response
Posted on 2008-08-17 14:17:18-07 by exiftool in response to 8579
Re: Problem Setting FileModifyDate
Thanks for looking into this. It would be nice if there were a more convenient solution. :(

- Phil
Direct Responses: 8674 | Write a response
Posted on 2008-08-26 10:49:01-07 by exiftool in response to 8595
Re: Problem Setting FileModifyDate
I think I have found the solution, and will revert the Windows version of exiftool 7.41 to use Perl 5.8 once again. In this version (to be released within a few days), I will add a Windows-specific patch that should fix the timezone problem. - Phil
Direct Responses: Write a response