pasn
Class ASN1UTCTime
java.lang.Object
pasn.ASN1Object
pasn.ASN1SimpleObject<ASN1TimeValue>
pasn.ASN1Time
pasn.ASN1UTCTime
- All Implemented Interfaces:
- ASN1DefaultValuedObject, ASN1EncodingSpecificObject, ASN1GenericObject, ASN1PrimitiveObject<ASN1TimeValue>, ASN1Resetable
public class ASN1UTCTime
- extends ASN1Time
An ASN.1 UTCTime represents date and time, 2-digit year.
UTC time formats are:
yymmddhhmmZ (format 0)
yymmddhhmmssZ (format 1)
yymmddhhmm+hhmm (format 2)
yymmddhhmm-hhmm (format 2)
yymmddhhmmss+hhmm (format 3)
yymmddhhmmss-hhmm (format 3)
yymmddhhmmss.s..Z (format 4)
yymmddhhmmss.s..+hhmm (format 5)
yymmddhhmmss.s..-hhmm (format 5)
where:
- yy indicates the latest 2 digits of the year (03
instead of 2003 for example). If the 2 digits of the year indicate
a value less than 50 then it is supposed to be 20yy. If the year is greater
than or equal to 50 then it is supposed to be 19yy
- mm is the month number, starting at 01 (for
january)
- dd represents the number of days from the first day of the
month (in the maximum range [01, 31])
- hh is the hour of the day, from 00 to 23,
where noon is represented by 12
- mm indicates the number of minutes since the hour started
(from 00 to 59)
- ss represents the number of seconds elapsed since the current
minute run as 2 digits from 00 to 59
- .s.. is the number of milliseconds. It is expressed on a
single digit up to 3 digits
Z indicates that local time is Zulu (GMT)
+ indicates that local time is later than GMT and - it
is earlier than GMT
hhmm is the absolute difference from GMT in hours (first 2 digits)
and minutes (last 2 digits)
- Author:
- N. Cottin - http://www.ncottin.net
- See Also:
ASN1GeneralizedTime
Constructor Summary |
ASN1UTCTime()
Creates an empty time object. |
Method Summary |
java.lang.String |
getASN1Name()
|
void |
setValue(java.lang.String value)
Initializes this ASN.1 time object with a string representation of a date
and time |
Methods inherited from class pasn.ASN1Time |
createValue, getAppropriateTime, getAppropriateTime, getAppropriateTime, getTimeFormat, hasDefaultValue, hasValue, isTimeValidated, isValueDefault, reset, setDecodedValue, setTimeFormat, setTimeValidation, setValue, toString, toString, validateConstraints |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
ASN1UTCTime
public ASN1UTCTime()
Creates an empty time object. This object is not initialized with a time
value
getASN1Name
public final java.lang.String getASN1Name()
setValue
public final void setValue(java.lang.String value)
throws ASN1FormatException,
ASN1ConstraintException
- Description copied from class:
ASN1Time
- Initializes this ASN.1 time object with a string representation of a date
and time
- Specified by:
setValue
in class ASN1Time
- Parameters:
value
- A time value. A null or empty ("") value leads to
assign the current time value using local time zone
- Throws:
ASN1FormatException
- The given value does not correspond to a
valid time representation
ASN1ConstraintException