DERGeneralizedTime (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.asn1

## Class DERGeneralizedTime

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.ASN1Primitive
    - - org.bouncycastle.asn1.ASN1GeneralizedTime
      - - org.bouncycastle.asn1.DERGeneralizedTime

- All Implemented Interfaces:
    ASN1Encodable, Encodable

      public class DERGeneralizedTime
      extends ASN1GeneralizedTime

  DER Generalized time object.

  ### 11: Restrictions on BER employed by both CER and DER

  #### 11.7 GeneralizedTime

  11.7.1 The encoding shall terminate with a "Z", as described in the ITU-T Rec. X.680 | ISO/IEC 8824-1 clause on GeneralizedTime.

  11.7.2 The seconds element shall always be present.

  11.7.3 The fractional-seconds elements, if present, shall omit all trailing zeros; if the elements correspond to 0, they shall be wholly omitted, and the decimal point element also shall be omitted.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DERGeneralizedTime(byte[] time)`
    `DERGeneralizedTime(java.util.Date time)`
    `DERGeneralizedTime(java.lang.String time)`

  - ### Method Summary

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1GeneralizedTime

      `getDate, getInstance, getInstance, getTagged, getTime, getTimeString, hasFractionalSeconds, hashCode, hasMinutes, hasSeconds`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Primitive

      `encodeTo, encodeTo, equals, equals, equals, fromByteArray, fromStream, toASN1Primitive`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `getEncoded, getEncoded, hasEncodedTagValue`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DERGeneralizedTime

          public DERGeneralizedTime(byte[] time)

    - #### DERGeneralizedTime

          public DERGeneralizedTime(java.util.Date time)

    - #### DERGeneralizedTime

          public DERGeneralizedTime(java.lang.String time)