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 2021/03/13 09:43:56 UTC

svn commit: r1887571 - /pdfbox/branches/1.8/jempbox/src/test/java/org/apache/jempbox/xmp/DateConverterTest.java

Author: tilman
Date: Sat Mar 13 09:43:56 2021
New Revision: 1887571

URL: http://svn.apache.org/viewvc?rev=1887571&view=rev
Log:
PDFBOX-5127: more debug stuff to find out what's going on; use Z instead of XXX which isn't supported on jdk6

Modified:
    pdfbox/branches/1.8/jempbox/src/test/java/org/apache/jempbox/xmp/DateConverterTest.java

Modified: pdfbox/branches/1.8/jempbox/src/test/java/org/apache/jempbox/xmp/DateConverterTest.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/jempbox/src/test/java/org/apache/jempbox/xmp/DateConverterTest.java?rev=1887571&r1=1887570&r2=1887571&view=diff
==============================================================================
--- pdfbox/branches/1.8/jempbox/src/test/java/org/apache/jempbox/xmp/DateConverterTest.java (original)
+++ pdfbox/branches/1.8/jempbox/src/test/java/org/apache/jempbox/xmp/DateConverterTest.java Sat Mar 13 09:43:56 2021
@@ -30,7 +30,7 @@ public class DateConverterTest extends T
 {
     public void testDateConverter() throws IOException
     {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss XXX");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss Z");
 
         TimeZone timezone = TimeZone.getDefault();
         TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
@@ -40,10 +40,12 @@ public class DateConverterTest extends T
                 sdf.format(DateConverter.toCalendar("12/23/2020").getTime()).substring(0, 10));
         
         Calendar cal = DateConverter.toCalendar("2012-10-30T12:24:59+01:00");
-        System.out.println("cal: " + cal);
+        System.out.println("cal1: " + cal);
+        System.out.println("cal2: " + cal.getTimeInMillis());
+        System.out.println("cal3: " + cal.getTime());
 
         // happy path
-        assertEquals("2012-10-30 12:24:59 +01:00",
+        assertEquals("2012-10-30 12:24:59 +0100",
                 sdf.format(DateConverter.toCalendar("2012-10-30T12:24:59+01:00").getTime()));
 
         TimeZone.setDefault(timezone);