X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=1c864fc6d8a88b07ad5b599cfa54b8389ff9671d;hp=0b2fa2488f1df4e7e3e463e015d6db0a13a4663e;hb=f82413576837d2d9e2cb70a283a104dfbf4e08c2;hpb=8e147d49e7c7a81680bdf14f77c0d0e227aaa6c6 diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 0b2fa24..1c864fc 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -182,10 +182,10 @@ sub update_width_height { # Also find the date taken if appropriate (from the EXIF tag etc.) my $info = Image::ExifTool::ImageInfo(get_disk_location($r, $id)); my $datetime = undef; - + if (defined($info->{'DateTimeOriginal'})) { # Parse the date and time over to ISO format - if ($info->{'DateTimeOriginal'} =~ /^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/ && $1 > 1990) { + if ($info->{'DateTimeOriginal'} =~ /^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)(?:\+\d\d:\d\d)?$/ && $1 > 1990) { $datetime = "$1-$2-$3 $4:$5:$6"; } }