X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Fxmp%2FXMPValidate.php;h=31eaa3baa76ca41115b490917c1986a6481f171f;hb=37751ee23e7b7019307eafe36f18c8450bf2e420;hp=32a3340fa165790628b2c89137b146c678754213;hpb=e3f6c10d87732c0c8a9bbd7bb57b6c964b92e29a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/xmp/XMPValidate.php b/includes/libs/xmp/XMPValidate.php index 32a3340fa1..31eaa3baa7 100644 --- a/includes/libs/xmp/XMPValidate.php +++ b/includes/libs/xmp/XMPValidate.php @@ -329,15 +329,15 @@ class XMPValidate implements LoggerAwareInterface { // We know that if we got to this step, year, month day hour and min must be set // by virtue of regex not failing. - $unix = ( new ConvertableTimestamp( + $unix = ConvertibleTimestamp::convert( TS_UNIX, $res[1] . $res[2] . $res[3] . $res[4] . $res[5] . $res[6] - ) )->getTimestamp( TS_UNIX ); + ); $offset = intval( substr( $res[7], 1, 2 ) ) * 60 * 60; $offset += intval( substr( $res[7], 4, 2 ) ) * 60; if ( substr( $res[7], 0, 1 ) === '-' ) { $offset = -$offset; } - $val = ( new ConvertableTimestamp( $unix + $offset ) )->getTimestamp( TS_EXIF ); + $val = ConvertibleTimestamp::convert( TS_EXIF, $unix + $offset ); if ( $stripSeconds ) { // If seconds weren't specified, remove the trailing ':00'.