[Bug] Photos scanned with incorrect timezone for the captured time

Server Version#: 1.29.0.6244-819d3678c (Debian 9, amd64)

I added some new photos to my existing photos library today (added new files to the filesystem),
but they all got the wrong Captured Time inside Plex.

E.g. for one picture it shows 2022-10-02 03:07:03 as the Captured Time instead of 2022-10-02 05:07:03. 05:07:03 is what the operation system shows and what’s saved in the exif data:

$ stat 2022100205070300.jpg
File: 2022100205070300.jpg
Size: 206231 Blocks: 408 IO Block: 4096 regular file
Device: […]
Access: […]
Access: 2022-10-02 23:37:37.796335432 +0200
Modify: 2022-10-02 05:07:03.000000000 +0200
Change: 2022-10-02 22:48:32.450601518 +0200
Birth: -

$ file 2022100205070300.jpg
2022100205070300.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=8, manufacturer=Nintendo co., ltd, orientation=upper-left, xresolution=128, yresolution=136, resolutionunit=2, datetime=2022:10:02 05:07:03], baseline, precision 8, 1280x720, frames 3

I’m in the timezone Europe/Berlin, that’s currently CEST (UTC+2). The system is correctly configured with that timezone and date prints out the correct local time.

Another picture that was taken when I was still in CET (UTC+1) has an inavalid offset of 1 hour in Plex.

Likely the Plex scanner wrongly assumes that the datetime in the exif metadata is in UTC and not in the local time, because it is saved there without timezone information.


Together with the images I also added some MP4 videos to the same album (with the creation_time metadata in local time). Their Originally Available time is shown correct in Plex, but they are out of order with the photos in the timeline now.

Example video with the correct 2022-10-02 05:06:38 as Originally Available in Plex:

$ stat 2022100205063800.mp4
File: 2022100205063800.mp4
Size: 9337315 Blocks: 18240 IO Block: 4096 regular file
Device: […]
Access: […]
Access: 2022-10-02 23:38:00.616346480 +0200
Modify: 2022-10-02 05:06:38.000000000 +0200
Change: 2022-10-02 22:48:36.958602677 +0200
Birth: -

$ ffmpeg -i 2022100205063800.mp4 -f ffmetadata
[…]
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘2022100205063800.mp4’:
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2022-10-02 05:06:38
encoder : Lavf55.33.100
[…]

Note: the creation_time metadata is also saved without timezone information, but Plex interprets it correctly as the local timezone. From experience I know that at least in the past Plex ignored the modification time and only used the creation_time metadata.


I know that this was working correctly in the past and the behavior likely changed within the last 8 months with an Plex server update. Because the last import of photos I did in February and their times are still all correct inside Plex.

Here is an example that I added to the library in February where the Captured Time was correctly set to 2022-02-17 14:07:03:

$ stat 2022021714070300.jpg
File: 2022021714070300.jpg
Size: 259871 Blocks: 512 IO Block: 4096 regular file
Device: […]
Access: […]
Access: 2022-10-02 22:49:17.510613116 +0200
Modify: 2022-02-17 14:07:03.000000000 +0100
Change: 2022-02-20 04:00:32.592570589 +0100
Birth: -

$ file 2022021714070300.jpg
2022021714070300.jpg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=8, manufacturer=Nintendo co., ltd, orientation=upper-left, xresolution=128, yresolution=136, resolutionunit=2, datetime=2022:02:17 14:07:03], baseline, precision 8, 1280x720, frames 3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.