ExifTool Forum

ExifTool => Newbies => Topic started by: Willcas.36 on March 30, 2023, 02:27:16 PM

Title: Heic Tags been deleted
Post by: Willcas.36 on March 30, 2023, 02:27:16 PM
Original time tags from my heic file:

File Modification Date/Time    : 2023:03:27 16:39:40-04:00
File Access Date/Time          : 2023:03:30 13:59:52-04:00
File Inode Change Date/Time    : 2023:03:30 13:59:50-04:00
Modify Date                    : 2023:03:27 16:39:40
Date/Time Original              : 2023:03:27 16:39:40
Create Date                    : 2023:03:27 16:39:40
Offset Time                    : -04:00
Offset Time Original            : -04:00
Offset Time Digitized          : -04:00
Sub Sec Time Original          : 381
Sub Sec Time Digitized          : 381
GPS Date Stamp                  : 2023:03:27
Date Created                    : 2023:03:27 16:39:40
Profile Date Time              : 2022:01:01 00:00:00
Create Date                    : 2023:03:27 16:39:40.381-04:00
Date/Time Original              : 2023:03:27 16:39:40.381-04:00
Modify Date                    : 2023:03:27 16:39:40-04:00

My problem is that when I updated those time tags using this command:
exiftool -api QuickTimeUTC -m -r -api LargeFileSupport=1 -overwrite_original '-time:all<$CreateDate' -wm w DIR

I got something like this:

File Modification Date/Time    : 2023:03:30 14:19:34-04:00
File Access Date/Time          : 2023:03:30 14:19:36-04:00
File Inode Change Date/Time    : 2023:03:30 14:19:34-04:00
Modify Date                    : 2023:03:27 16:39:40
Date/Time Original              : 2023:03:27 16:39:40
Create Date                    : 2023:03:27 16:39:40
GPS Date Stamp                  : 2023:03:27
Date Created                    : 2023:03:27 16:39:40
Profile Date Time              : 2022:01:01 00:00:00

Losing some data like:

Offset Time                    : -04:00
Offset Time Original            : -04:00
Offset Time Digitized          : -04:00
Sub Sec Time Original          : 381
Sub Sec Time Digitized          : 381

Also losing the double "Create, Date/time Modify Dates" that where in UTC time (-04:00)

could someone explain to me why this happens, how can I change the dates without losing data and tags and does it mean for a heic file to have doble tag dates. PD: sorry for my English.
Title: Re: Heic Tags been deleted
Post by: StarGeek on March 30, 2023, 08:37:31 PM
When you are writing to Time:All, this includes writing to the Composite tags, SubSecCreateDate, SubSecDateTimeOriginal, and SubSecModifyDate.  These tags write to the main three EXIF tags and their associated timezone (OffsetTime*) and subsecond (SubsecTime*) tags.  Because you are copying from just CreateDate, which by itself does not include the time zone and subseconds, then the related tags removed.

Try copying from SubSecCreateDate instead of CreateDate.