Examples of toGeneralizedTime()


Examples of org.apache.directory.api.util.GeneralizedTime.toGeneralizedTime()

        try
        {
            String prepared = PrepareString.normalize( value, PrepareString.StringType.DIRECTORY_STRING );

            GeneralizedTime time = new GeneralizedTime( prepared );
            String normalized = time.toGeneralizedTime( Format.YEAR_MONTH_DAY_HOUR_MIN_SEC_FRACTION,
                FractionDelimiter.DOT, 3, TimeZoneFormat.Z );

            return normalized;
        }
        catch ( IOException ioe )
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

        try
        {
            String prepared = PrepareString.normalize( value, PrepareString.StringType.DIRECTORY_STRING );

            GeneralizedTime time = new GeneralizedTime( prepared );
            String normalized = time.toGeneralizedTime( Format.YEAR_MONTH_DAY_HOUR_MIN_SEC_FRACTION,
                FractionDelimiter.DOT, 3, TimeZoneFormat.Z );

            return normalized;
        }
        catch ( IOException ioe )
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

        try
        {
            String prepared = PrepareString.normalize( value, PrepareString.StringType.DIRECTORY_STRING );

            GeneralizedTime time = new GeneralizedTime( prepared );
            String normalized = time.toGeneralizedTime( Format.YEAR_MONTH_DAY_HOUR_MIN_SEC_FRACTION,
                FractionDelimiter.DOT, 3, TimeZoneFormat.Z );

            return normalized;
        }
        catch ( IOException ioe )
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

    @Test
    public void testYearMonthDayHourMinZulu() throws ParseException
    {
        String gt = "200801021213Z";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
    }


    /**
 
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

    @Test
    public void testYearMonthDayHourMinPlusHour() throws ParseException
    {
        String gt = "200801021213+04";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
    }


    /**
 
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

    @Test
    public void testYearMonthDayHourMinMinusHourMin() throws ParseException
    {
        String gt = "200801021213-1030";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
    }


    /**
 
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

    @Test
    public void testYearMonthDayHourMinDotFractionZulu() throws ParseException
    {
        String gt = "200801021213.987Z";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
    }


    /**
 
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

    @Test
    public void testYearMonthDayHourMinDotFractionPlusHour() throws ParseException
    {
        String gt = "200801021213.987+0100";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
    }


    /**
 
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

    @Test
    public void testYearMonthDayHourMinDotFractionMinusHourMin() throws ParseException
    {
        String gt = "200801021213.987-1030";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
    }


    /**
 
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime.toGeneralizedTime()

    @Test
    public void testYearMonthDayHourMinCommaFractionZulu() throws ParseException
    {
        String gt = "200801021213,987Z";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
    }


    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.