Function timetogen

  • GeneralizedTime or UTCTime string to GeneralizedTime

    Parameters

    • s: string

      GeneralizedTime or UTCTime string (ex. 20170412235959.384Z)

    Returns string

    GeneralizedTime

    Description

    This function converts UTCTime string (i.e. YYMMDDHHmmSSZ ) to GeneralizedTime (YYYYMMDDHHmmSSZ) when the argument 's' is UTCTime. Argument string may have fraction of seconds and its length is one or more digits such as "170410235959.1234567Z". As for UTCTime, if year "YY" is equal or less than 49 then it is 20YY. If year "YY" is equal or greater than 50 then it is 19YY.

    Example

    timetogen(  "071231235959Z") -> "20071231235959Z"
    timetogen( "971231235959Z") -> "19971231235959Z"
    timetogen("20071231235959Z") -> "20071231235959Z"
    timetogen( "971231235959.123Z") -> "19971231235959.123Z"