[Osaas-commits] r70 - in trunk: . client/java/src/de/intevation/osaas

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Mar 19 19:11:17 CET 2010


Author: bh
Date: 2010-03-19 19:11:17 +0100 (Fri, 19 Mar 2010)
New Revision: 70

Modified:
   trunk/ChangeLog
   trunk/client/java/src/de/intevation/osaas/OSAASClient.java
Log:
* client/java/src/de/intevation/osaas/OSAASClient.java: Split the
actual timestamp formatting from getTimestamp into the new method
formatTime, so that it can be used for other timestamps, too.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-03-19 18:08:01 UTC (rev 69)
+++ trunk/ChangeLog	2010-03-19 18:11:17 UTC (rev 70)
@@ -1,5 +1,11 @@
 2010-03-19  Bernhard Herzog  <bh at intevation.de>
 
+	* client/java/src/de/intevation/osaas/OSAASClient.java: Split the
+	actual timestamp formatting from getTimestamp into the new method
+	formatTime, so that it can be used for other timestamps, too.
+
+2010-03-19  Bernhard Herzog  <bh at intevation.de>
+
 	Adapt server tests to new timestamps:
 
 	* server/test/test_formparser.py

Modified: trunk/client/java/src/de/intevation/osaas/OSAASClient.java
===================================================================
--- trunk/client/java/src/de/intevation/osaas/OSAASClient.java	2010-03-19 18:08:01 UTC (rev 69)
+++ trunk/client/java/src/de/intevation/osaas/OSAASClient.java	2010-03-19 18:11:17 UTC (rev 70)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007 by Intevation GmbH
+ * Copyright (c) 2007, 2010 by Intevation GmbH
  *
  * Author: Bernhard Herzog <bh at intevation.de>
  *
@@ -58,9 +58,12 @@
         return null;
     }
 
+    private String formatTime(Calendar datetime) {
+        return String.format("%1$tFT%1$tTZ", datetime);
+    }
+
     private String getTimestamp() {
-        Calendar now = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
-        return String.format("%1$tFT%1$tTZ", now);
+        return formatTime(new GregorianCalendar(TimeZone.getTimeZone("GMT")));
     }
 
     private void logFailedRequest(String request) {



More information about the Osaas-commits mailing list