You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2020/06/29 17:04:12 UTC

svn commit: r1879344 - /pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java

Author: tilman
Date: Mon Jun 29 17:04:12 2020
New Revision: 1879344

URL: http://svn.apache.org/viewvc?rev=1879344&view=rev
Log:
PDFBOX-4902: fix bug with half hour timezones, thanks Juho Tikkala

Modified:
    pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java

Modified: pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java?rev=1879344&r1=1879343&r2=1879344&view=diff
==============================================================================
--- pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java (original)
+++ pdfbox/branches/1.8/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java Mon Jun 29 17:04:12 2020
@@ -305,10 +305,9 @@ public class DateConverter
             retval.append("+");
         }
         timeZone = Math.abs(timeZone);
-        // milliseconds/1000 = seconds = seconds / 60 = minutes = minutes/60 =
-        // hours
+        // milliseconds/1000 = seconds; seconds / 60 = minutes; minutes/60 = hours
         int hours = timeZone / 1000 / 60 / 60;
-        int minutes = (timeZone - (hours * 1000 * 60 * 60)) / 1000 / 1000;
+        int minutes = (timeZone - (hours * 1000 * 60 * 60)) / 1000 / 60;
         if (hours < 10)
         {
             retval.append("0");