Different behavior between Command Line and Stay Open for Creation Date

Started by japanjoe, April 07, 2023, 05:01:41 PM

Previous topic - Next topic

japanjoe

I live in Central time and I recently was on vacation in Pacific time. One of our cameras was not set correctly for Pacific time. I am working to correct the QuickTime:CreationDate on MP4/MOV so that it is correct.

I am well aware that time should be UTC for CreateDate, ModifyDate, MediaCreateDate, MediaModifyDate, Track... etc. and I have no issues setting that. Different than UTC, however, QuickTime:CreationDate appears as "local with offset". For example: 2023:03:21 15:32:53-07:00. In other words, when I was in San Francisco and took this movie, the local time was 3:32PM. QuickTime:CreationDate appears as I have it above and CreateDate, etc. appears in UTC as 2023:03:21 22:32:53. All of this is correct.

I had one camera, however, that was set to central while in pacific time. That camera has QuickTime:CreationDate as 2023:03:21 15:32:53-05:00. Again, I have no issues setting CreateDate etc. correctly to UTC. I also have no issues setting QuickTime:CreationDate to the correct "local with offset" using command line.

The issue is when setting QuickTime:CreationDate using -stayopen. There is different behavior than command line. Below are the two approaches: Command Line vs. Stay Open. Either there is a bug or I am missing something.

Command Line: Here is a screenshot of my successful attempts to update to -07:00:
CommandLineWorks.JPG
  • First command shows it's -05:00
  • Second command updates it
  • Third command now shows it's -07:00

Stay Open: Here is a screenshot of my -stayopen attempt:
StayOpenDoesNot.JPG
  • First command shows the stay open command. It's going to monitor test.txt
  • I then save the test.txt file with the lines you see
  • I exit out of -stayopen with Ctrl+C
  • I then run a command that shows it's back to -05:00, which is this computer's current timezone now that my vacation is over and I'm back in Central time

Also, just as a test, I set my computers time zone to Pacific and stayopen set the offset to -07:00 which is "correct", but it also sets it to, for example, +09:00 if I set my computer's time zone to Japan time. Lastly, depending when you are reading this, all the offsets are when Daylight Savings is in effect. i.e. normally central is -06:00 and pacific is -08:00. Hoping to avoid going off on DST tangents in this thread  ;) All testing was performed with Version 12.60 with Windows 10.

Please let me know if I am doing something incorrectly with -stayopen or if there is indeed a bug.

Phil Harvey

Very interesting.  The difference is because quotes should not be used in an ARGFILE, so ExifTool doesn't recognize the time zone which it requires to be at the end of the value (but it isn't because of the trailing quote).

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

japanjoe

What a relief! I was losing my mind trying to figure that out! Thanks you so very much!!

I was able to confirm removing the quotes gets it to work.
StayOpenWorks.JPG

Much appreciated!!

Broader context: Just got back from a 12 day trip with 5 cameras and 4,000+ pics. Not all camera times were set correctly. exiftool is a lifesaver for making it easy to bring pictures together!