summaryrefslogtreecommitdiffstats
path: root/src/org/uic/barcode/ticket/api/asn
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-03-26 12:30:43 +0100
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-03-26 12:30:43 +0100
commit7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3 (patch)
tree2d135723d1b9f1a0efde590377975b5282d1327f /src/org/uic/barcode/ticket/api/asn
parenttemp (diff)
downloadUIC-barcode-7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3.tar
UIC-barcode-7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3.tar.gz
UIC-barcode-7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3.tar.bz2
UIC-barcode-7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3.tar.lz
UIC-barcode-7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3.tar.xz
UIC-barcode-7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3.tar.zst
UIC-barcode-7fdbb7106dc209b1bb1de9d8e6b56b8b131466f3.zip
Diffstat (limited to 'src/org/uic/barcode/ticket/api/asn')
-rw-r--r--src/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java b/src/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java
index d0c5710..d67f857 100644
--- a/src/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java
+++ b/src/org/uic/barcode/ticket/api/asn/omv1/CustomerCardData.java
@@ -21,7 +21,6 @@ package org.uic.barcode.ticket.api.asn.omv1;
import java.util.Calendar;
import java.util.Date;
-import java.util.TimeZone;
import org.uic.barcode.asn1.datatypes.Asn1BigInteger;
import org.uic.barcode.asn1.datatypes.Asn1Optional;
@@ -252,7 +251,6 @@ public class CustomerCardData extends Object {
untilCal.setTime(untilDate);
int untildays = untilCal.get(Calendar.DAY_OF_YEAR);
-
int yearDiff = untilCal.get(Calendar.YEAR) - fromCal.get(Calendar.YEAR);
this.validUntilYear = new Long( yearDiff);
@@ -262,14 +260,15 @@ public class CustomerCardData extends Object {
public Date getValidFromDate (){
- if (this.validFromYear == null || this.validFromYear == 0) return null;
+ if (this.validFromYear == null || this.validFromDay == null) return null;
Calendar cal = Calendar.getInstance();
cal.clear();
- cal.setTimeZone(TimeZone.getTimeZone("UTC"));
+ //cal.setTimeZone(TimeZone.getTimeZone("UTC"));
cal.set(Calendar.YEAR, this.validFromYear.intValue());
cal.set(Calendar.DAY_OF_YEAR, this.validFromDay.intValue());
-
+ cal.set(Calendar.MINUTE,0);
+ cal.set(Calendar.HOUR_OF_DAY,0);
return cal.getTime();
}
@@ -277,17 +276,18 @@ public class CustomerCardData extends Object {
public Date getValidUntilDate (){
- if (this.validUntilYear == null || this.validUntilYear == 0) return null;
+ if (this.validUntilYear == null || this.validUntilDay == null) return null;
Calendar cal = Calendar.getInstance();
cal.clear();
- cal.setTimeZone(TimeZone.getTimeZone("UTC"));
+ //cal.setTimeZone(TimeZone.getTimeZone("UTC"));
cal.set(Calendar.YEAR, this.validFromYear.intValue());
if (this.validUntilYear != null) {
cal.add(Calendar.YEAR, this.validUntilYear.intValue());
}
cal.set(Calendar.DAY_OF_YEAR, this.validUntilDay.intValue());
-
+ cal.set(Calendar.MINUTE,59);
+ cal.set(Calendar.HOUR_OF_DAY,23);
return cal.getTime();
}