From dev-return-57882-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Wed Aug 22 21:33:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0DA2D180662 for ; Wed, 22 Aug 2018 21:33:03 +0200 (CEST) Received: (qmail 96932 invoked by uid 500); 22 Aug 2018 19:33:03 -0000 Mailing-List: contact dev-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list dev@pdfbox.apache.org Received: (qmail 96921 invoked by uid 99); 22 Aug 2018 19:33:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2018 19:33:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id ADF78C7A6A for ; Wed, 22 Aug 2018 19:33:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 0jWylrJ0eVH7 for ; Wed, 22 Aug 2018 19:33:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 427E25F431 for ; Wed, 22 Aug 2018 19:33:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7D566E0E5D for ; Wed, 22 Aug 2018 19:33:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 132D62468F for ; Wed, 22 Aug 2018 19:33:00 +0000 (UTC) Date: Wed, 22 Aug 2018 19:33:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PDFBOX-4292) Validation fails if ModifyDate and ModDate are specified using different time zones MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PDFBOX-4292?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D165= 89285#comment-16589285 ]=20 ASF subversion and git services commented on PDFBOX-4292: --------------------------------------------------------- Commit 1838678 from tilman@apache.org in branch 'pdfbox/trunk' [ https://svn.apache.org/r1838678 ] PDFBOX-4292: compare calendar objects instead of ISO 8601 values to avoid f= alse differences when time zones are different, as suggested by Alonso Gonz= alez; set milliseconds to 0 in test for xmp values because these millisecon= ds are kept, but not in COS values; add a test > Validation fails if ModifyDate and ModDate are specified using different = time zones > -------------------------------------------------------------------------= ---------- > > Key: PDFBOX-4292 > URL: https://issues.apache.org/jira/browse/PDFBOX-4292 > Project: PDFBox > Issue Type: Bug > Components: Preflight > Affects Versions: 2.0.11 > Reporter: Alonso Gonzalez > Priority: Major > Attachments: Test 2.pdf > > > I have a test PDF with this metadata: > {quote}/ModDate (D:20180817115837+02'00') > 2018-08-17T09:58:37Z > {quote} > =C2=A0 > According to the specification this is valid and should be considered as = equivalent: > {quote}For properties that map between the PDF date type, defined by PDF > Reference, 3.8.2, and the XMP Date type, defined by Date and Time Formats= , value equivalence shall be on a > component-by-component basis, relative to Coordinated Universal Time (UTC= ), i.e., correcting for local time > zone offset. > EXAMPLE The document information dictionary entries: > /CreationDate (D:20040402) > /ModDate (D:200404080+91132-05'00') > are equivalent to the XMP properties: > 2004-04-02 > 2004-04-08T14:11:32Z > {quote} > =C2=A0 > In org.apache.pdfbox.preflight.metadata.SynchronizedMetaDataValidation#an= alyzeModifyDateProperty the calendar objects are formatted as strings and t= hen compared: > {code:java} > else if(!DateConverter.toISO8601(xmpModifyDate).equals(DateConverter.toIS= O8601(modifyDate))) { > ve.add(this.unsynchronizedMetaDataError("ModificationDate")); > } > {code} > In my testcase DateConverter.toISO8601(modifyDate) yields "2018-08-17T11:= 58:37+02:00" while DateConverter.toISO8601(xmpModifyDate) yields "2018-08-1= 7T09:58:37+00:00". These timestamps are semantically equal (xmpModifyDate.c= ompareTo(modifyDate) yields 0) and therefore the PDF should be considered a= s valid PDF-A1b. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional commands, e-mail: dev-help@pdfbox.apache.org