public PackedDate( String time) { this.time = convert(time); }
public PackedDate( String time) { this.time = convert(time); }
/** * Base constructor from a java.util.date object. * * @param time a date object representing the time of interest. */ public PackedDate( Date time) { SimpleDateFormat dateF = new SimpleDateFormat("yyMMdd'Z'"); dateF.setTimeZone(new SimpleTimeZone(0,"Z")); this.time = convert(dateF.format(time)); }
/** * Base constructor from a java.util.date object. * * @param time a date object representing the time of interest. */ public PackedDate( Date time) { SimpleDateFormat dateF = new SimpleDateFormat("yyMMdd'Z'"); dateF.setTimeZone(new SimpleTimeZone(0,"Z")); this.time = convert(dateF.format(time)); }
/** * Base constructor from a java.util.date object. You may need to use this constructor if the default locale * doesn't use a Gregorian calender so that the PackedDate produced is compatible with other ASN.1 implementations. * * @param time a date object representing the time of interest. * @param locale an appropriate Locale for producing an ASN.1 GeneralizedTime value. */ public PackedDate( Date time, Locale locale) { SimpleDateFormat dateF = new SimpleDateFormat("yyMMdd'Z'", locale); dateF.setTimeZone(new SimpleTimeZone(0,"Z")); this.time = convert(dateF.format(time)); }
/** * Base constructor from a java.util.date object. You may need to use this constructor if the default locale * doesn't use a Gregorian calender so that the PackedDate produced is compatible with other ASN.1 implementations. * * @param time a date object representing the time of interest. * @param locale an appropriate Locale for producing an ASN.1 GeneralizedTime value. */ public PackedDate( Date time, Locale locale) { SimpleDateFormat dateF = new SimpleDateFormat("yyMMdd'Z'", locale); dateF.setTimeZone(new SimpleTimeZone(0,"Z")); this.time = convert(dateF.format(time)); }