Home | History | Annotate | Download | only in cms

Lines Matching defs:time

25  * Time ::= CHOICE {
36 public class Time
40 ASN1Primitive time;
42 public static Time getInstance(
52 public Time(
53 ASN1Primitive time)
55 if (!(time instanceof ASN1UTCTime)
56 && !(time instanceof ASN1GeneralizedTime))
58 throw new IllegalArgumentException("unknown object passed to Time");
61 this.time = time;
65 * Creates a time object from a given date - if the date is between 1950
69 * @param time a date object representing the time of interest.
71 public Time(
72 Date time)
81 String d = dateF.format(time) + "Z";
86 this.time = new DERGeneralizedTime(d);
90 this.time = new DERUTCTime(d.substring(2));
95 * Creates a time object from a given date and locale - if the date is between 1950
100 * @param time a date object representing the time of interest.
103 public Time(
104 Date time,
116 String d = dateF.format(time) + "Z";
121 this.time = new DERGeneralizedTime(d);
125 this.time = new DERUTCTime(d.substring(2));
130 * Return a Time object from the given object.
135 * <li> {@link Time} object
143 public static Time getInstance(
146 if (obj == null || obj instanceof Time)
148 return (Time)obj;
152 return new Time((ASN1UTCTime)obj);
156 return new Time((ASN1GeneralizedTime)obj);
167 if (time instanceof ASN1UTCTime)
169 return ((ASN1UTCTime)time).getAdjustedTime();
173 return ((ASN1GeneralizedTime)time).getTime();
178 * Get java.util.Date version of date+time.
184 if (time instanceof ASN1UTCTime)
186 return ((ASN1UTCTime)time).getAdjustedDate();
190 return ((ASN1GeneralizedTime)time).getDate();
204 return time;