aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-06-18 12:21:01 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-06-18 12:21:01 +0200
commitb3b58d9be6c3f5dd7e26c67d406cefbf8bf87110 (patch)
treee0abeccfc83f8645b6f878c74bfb07e7b0dd14a9 /pdf-as-lib/src/main/java/at/gv
parentdac9d42b384ee416c9887651a11e3a30a97a2d6d (diff)
downloadpdf-as-4-b3b58d9be6c3f5dd7e26c67d406cefbf8bf87110.tar.gz
pdf-as-4-b3b58d9be6c3f5dd7e26c67d406cefbf8bf87110.tar.bz2
pdf-as-4-b3b58d9be6c3f5dd7e26c67d406cefbf8bf87110.zip
Fixing timestamp format always convert to UTC Zulu Time (issue: #21)
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java
index 16f23759..435ef5a3 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/ValueResolver.java
@@ -25,6 +25,7 @@ package at.gv.egiz.pdfas.lib.impl.stamping;
import java.text.SimpleDateFormat;
import java.util.Calendar;
+import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -66,11 +67,12 @@ public class ValueResolver implements IProfileConstants, IResolver {
logger.debug("Resolving value with value: " + value);
if (key.equals(SIG_DATE)) {
- if (value == null) {
- value = defaultDateFormat;
- }
+ //if (value == null) {
+ value = defaultDateFormat;
+ //}
// Value holds the date format!
SimpleDateFormat formater = new SimpleDateFormat(value);
+ formater.setTimeZone(TimeZone.getTimeZone("UTC"));
Calendar cal = Calendar.getInstance();
return formater.format(cal.getTime());
}