When uploading files and syncing the metadata, Piwigo seems only to be checking the DateCreated IPTC field and not using the TimeCreated field along with it. As a result, in the database the date_creation field on the images table is midnight (00:00:00).
For example, here's a file with some IPTC fields set:
Notice the date/time of 02/01/2019 18:12:00. When the file is uploaded to Piwigo, the date is missing the time:
But the read metadata plugin properly "sees" the time:
It would be nice if the time is loaded into the date_creation field along with the date.
When uploading files and syncing the metadata, Piwigo seems only to be checking the DateCreated IPTC field and not using the TimeCreated field along with it. As a result, in the database the date_creation field on the images table is midnight (00:00:00).
For example, here's a file with some IPTC fields set:

Notice the date/time of 02/01/2019 18:12:00. When the file is uploaded to Piwigo, the date is missing the time:

But the read metadata plugin properly "sees" the time:

It would be nice if the time is loaded into the date_creation field along with the date.
<!-- github-sync-id:413884654 -->
If EXIF information is available, the date/time is properly loaded. This just seems to be when relying on IPTC fields.
If EXIF information is available, the date/time is properly loaded. This just seems to be when relying on IPTC fields.
<!-- github-comment-id:466831759 -->
My observation is different. The Creation Date is also set to hh:mm = 00:00, if the DateTimeOriginal is populated in EXIF and visible with the Read metadata plugin:
If I upload my photos by means of the Digikam -> Piwigo Export function, the Creation Date includes the correct hh:mm values.
if I upload via the DOMAINNAME/admin.php?page=photos_add URL the time is set to zero, but in the Information link to the photo, the correct value of DateTimeOriginal appears under EXIF Metadata.
if I have a correct Creation Date and I apply the Synchronize metadata Action in the Batch Manager, the time is set to zero as well
Installed on 26 December 2023, 9 months 4 days ago
Operating system: Linux
PHP: 8.3.10 (Show info) [2024-09-30 19:05:27]
MySQL: 10.6.16-MariaDB [2024-09-30 19:05:27]
Graphics Library: ImageMagick 7.1.1-32
Cache size 1183.77 Mo calculated 2 months ago Refresh
Activated plugin list
(all in the latest version)
Admin Tools
Batch Downloader
Community
Language Switch
LocalFiles Editor
Offset Creation Date
OpenStreetMap
Read Metadata
Rotate Image
ShareAlbum
Tag Groups
User Collections
VideoJS
My observation is different. The **Creation Date** is also set to hh:mm = 00:00, if the DateTimeOriginal is populated in EXIF and visible with the _Read metadata_ plugin:
> ### EXIF Fields in 20240923-092607-0811.jpg
> FileName = 20240930181824-f437b537.jpg
> FileDateTime = 1727713104
> [...]
> ExifVersion = 0231
> **DateTimeOriginal = 2024:09:23 09:26:07**
> DateTimeDigitized = 2024:09:23 09:26:07
> [...]
I see following behaviour:
- If I upload my photos by means of the Digikam -> Piwigo Export function, the **Creation Date** includes the **correct hh:mm values**.
- if I upload via the _DOMAINNAME_/admin.php?page=photos_add URL the time **is set to zero,** but in the Information link to the photo, the correct value of DateTimeOriginal appears under EXIF Metadata.
- if I have a correct **Creation Date** and I apply the _Synchronize metadata_ Action in the Batch Manager, the time i**s set to zero** as well
### Environment
- [Piwigo](https://piwigo.org/) 14.5.0
- Installed on 26 December 2023, 9 months 4 days ago
- Operating system: Linux
- PHP: 8.3.10 (Show info) [2024-09-30 19:05:27]
- MySQL: 10.6.16-MariaDB [2024-09-30 19:05:27]
- Graphics Library: ImageMagick 7.1.1-32
- Cache size 1183.77 Mo calculated 2 months ago Refresh
### Activated plugin list
(all in the latest version)
- Admin Tools
- Batch Downloader
- Community
- Language Switch
- LocalFiles Editor
- Offset Creation Date
- OpenStreetMap
- Read Metadata
- Rotate Image
- ShareAlbum
- Tag Groups
- User Collections
- VideoJS
<!-- github-comment-id:2383739908 -->
I did some reading in the sources of functions_metadata.php and saw that based on the config file settings, the Creation Date among other data is derived from either EXIF or IPTC.
If in config.inc.php is set both
the Creation Date included the correct values for hh:mm after the Synchronize metadata Action in the Batch Manager.
Also the upload via the DOMAINNAME/admin.php?page=photos_add URL is now taking over the hh:mm values.
Solution 1
If EXIF is required, do not set $conf['use_iptc'] = true; in config.inc.php.
Maybe it makes sense, to add a warning to the EXIF section in config.inc.php
Solution 2
remove the line
'date_creation' => '2#055',
from config.inc.php but leave $conf['use_iptc'] = true;
This also works and has the advantage that other parameters still can be derived from IPTC
I did some reading in the sources of [functions_metadata.php](https://github.com/Piwigo/Piwigo/blob/b0a5c404e7a8cee8f369e62044cc153d72509f06/admin/include/functions_metadata.php#L34) and saw that based on the config file settings, the **Creation Date** among other data is derived from either EXIF or IPTC.
If in **config.inc.php** is set both
> $conf['use_iptc'] = true;
> $conf['use_exif'] = true;
IPTC obviously is prefered.
After I set
> **$conf['use_iptc'] = false;**
the Creation Date included the correct values for hh:mm after the _Synchronize metadata_ Action in the Batch Manager.
Also the upload via the _DOMAINNAME_/admin.php?page=photos_add URL is now taking over the hh:mm values.
### Solution 1
- If EXIF is required, **do not set $conf['use_iptc'] = true;** in config.inc.php.
Maybe it makes sense, to add a warning to the EXIF section in config.inc.php
### Solution 2
remove the line
> 'date_creation' => '2#055',
from config.inc.php but leave **$conf['use_iptc'] = true;**
This also works and has the advantage that other parameters still can be derived from IPTC
<!-- github-comment-id:2383880048 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When uploading files and syncing the metadata, Piwigo seems only to be checking the DateCreated IPTC field and not using the TimeCreated field along with it. As a result, in the database the date_creation field on the images table is midnight (00:00:00).
For example, here's a file with some IPTC fields set:
Notice the date/time of 02/01/2019 18:12:00. When the file is uploaded to Piwigo, the date is missing the time:
But the read metadata plugin properly "sees" the time:
It would be nice if the time is loaded into the date_creation field along with the date.
If EXIF information is available, the date/time is properly loaded. This just seems to be when relying on IPTC fields.
My observation is different. The Creation Date is also set to hh:mm = 00:00, if the DateTimeOriginal is populated in EXIF and visible with the Read metadata plugin:
I see following behaviour:
Environment
Activated plugin list
(all in the latest version)
I did some reading in the sources of functions_metadata.php and saw that based on the config file settings, the Creation Date among other data is derived from either EXIF or IPTC.
If in config.inc.php is set both
IPTC obviously is prefered.
After I set
the Creation Date included the correct values for hh:mm after the Synchronize metadata Action in the Batch Manager.
Also the upload via the DOMAINNAME/admin.php?page=photos_add URL is now taking over the hh:mm values.
Solution 1
Maybe it makes sense, to add a warning to the EXIF section in config.inc.php
Solution 2
remove the line
from config.inc.php but leave $conf['use_iptc'] = true;
This also works and has the advantage that other parameters still can be derived from IPTC