#16 2024-11-11 11:36:15

Phil35
Member
France
2022-10-11
90

Re: Setting Creation Date

Hi,

I solved creation date issues for photos and videos using the command exiftool.

Example for a mp4 file:
Before:
$ exiftool ./2024_09_21-10-01/20240929_194336.mp4  |grep "Create Date"
Create Date                     : 0000:00:00 00:00:00

After:
$ exiftool ./2024_09_21-10-01/20240929_194336.mp4  |grep  "Create Date"
Create Date                     : 2024:09:29 19:43:36

comand used to modify:
$ exiftool -AllDates="2024:09:29 19:43:36" ./2024_09_21-10-01/20240929_194336.mp4
    1 image files updated


It is not so difficult to script that
Hope this will help
Phil

Last edited by Phil35 (2024-11-11 11:36:44)


Piwigo 15.3 on production platform with raspberry pi 4 Model B Rev 1.4 (OS 11 (bullseye))

Offline

 

#17 2024-11-11 16:48:14

Kiko@Sea
Member
2023-01-28
4

Re: Setting Creation Date

Dear readers,

Thank you, Phil35, for your advice. I tried it. It works. But then...

I took a random jpg-file with no date and gave it a date of 0/0/1850 using exiftool. I had to use the -n option, to avoid an error notice.

IrfanView gives me a confirmation that the date had been defined:
     DateTime - 1850:00:00 00:00:00
     DateTimeOriginal - 1850:00:00 00:00:00
     DateTimeDigitized - 1850:00:00 00:00:00

I uploaded this image to Piwigo (15), opened it and the creation date suddenly is 31/12/1899. Curious, isn't it? What may have happened?

Thanks!

Kiko

Offline

 

#18 2024-11-11 20:06:27

erAck
Only trying to help
2015-09-06
2196

Re: Setting Creation Date

1850-00-00 is an invalid date anyway maybe resulting in a 0 or false date, and likely Piwigo somewhere has a minimum for an invalid date of 1899-12-31. Maybe it's also related to that in PHP "The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 03:14:07 UTC. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)", as cited from https://www.php.net/manual/en/function.strtotime.php

¯\_(ツ)_/¯


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2025 · Contact