FIX: fix some date patterns.... What is a weak year anyway....
authorFelix Dörre <felix@dogcraft.de>
Mon, 29 Sep 2014 08:25:42 +0000 (10:25 +0200)
committerJanis Streib <janis@dogcraft.de>
Wed, 31 Dec 2014 01:35:41 +0000 (02:35 +0100)
tests/org/cacert/gigi/pages/account/TestCertificateAdd.java
tests/org/cacert/gigi/pages/wot/TestAssurance.java
util/org/cacert/gigi/util/SimpleSigner.java

index 116cdd80edd2fc45921d42f6985a212c5decfd3d..6490c4aa6da1ad4f15e3f86b8f22f8a15191b2b0 100644 (file)
@@ -174,7 +174,7 @@ public class TestCertificateAdd extends ManagedTest {
         final long MS_PER_DAY = 24 * 60 * 60 * 1000;
         now -= now % MS_PER_DAY;
         now += MS_PER_DAY;
-        SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-dd");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
 
         Date start = new Date(now);
index ccbe1774139894fd73d607ed26391352815075c2..f519fb4e4744c4cbab15a775200efc3d3228f0d0 100644 (file)
@@ -127,7 +127,7 @@ public class TestAssurance extends ManagedTest {
 
     @Test
     public void testAssureFormFuture() throws IOException {
-        SimpleDateFormat sdf = new SimpleDateFormat("YYYY");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
         int year = Integer.parseInt(sdf.format(new Date(System.currentTimeMillis()))) + 2;
         String error = getError("date=" + year + "-01-01&location=testcase&certify=1&rules=1&CCAAgreed=1&assertion=1&points=10");
         assertTrue(error, !error.startsWith("</div>"));
index 75bb50990aebb1c7200b03f124672032659aaffb..d3b168a995547ebdc19af869cac4d59cade577e5 100644 (file)
@@ -47,7 +47,7 @@ public class SimpleSigner {
 
     private static Thread runner;
 
-    private static SimpleDateFormat sdf = new SimpleDateFormat("YYMMddHHmmss'Z'");
+    private static SimpleDateFormat sdf = new SimpleDateFormat("yyMMddHHmmss'Z'");
 
     static {
         TimeZone.setDefault(TimeZone.getTimeZone("UTC"));