Examples of GeneralizedTime


Examples of org.apache.directory.shared.util.GeneralizedTime

     */
    @Test
    public void testYearMonthDayHourMinusHourMin() throws ParseException
    {
        String gt = "2008010212-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

     */
    @Test
    public void testYearMonthDayHourDotFractionZulu() 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

     */
    @Test
    public void testYearMonthDayHourDotFractionPlusHour() throws ParseException
    {
        String gt = "2008010212.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

     */
    @Test
    public void testYearMonthDayHourDotFractionMinusHourMin() throws ParseException
    {
        String gt = "2008010212.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

     */
    @Test
    public void testYearMonthDayHourCommaFractionZulu() throws ParseException
    {
        String gt = "2008010212,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

     */
    @Test
    public void testYearMonthDayHourCommaFractionPlusHour() throws ParseException
    {
        String gt = "2008010212,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

     */
    @Test
    public void testYearMonthDayHourCommaFractionMinusHourMin() throws ParseException
    {
        String gt = "2008010212,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

     */
    @Test
    public void testFractionOfSecond() throws ParseException
    {
        String gt = "20080102121314,987Z";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
        assertEquals( 987, generalizedTime.getCalendar().get( Calendar.MILLISECOND ) );
    }
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime

     */
    @Test
    public void testFractionOfMinute1() throws ParseException
    {
        String gt = "200801021213,5Z";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
        assertEquals( 30, generalizedTime.getCalendar().get( Calendar.SECOND ) );
        assertEquals( 0, generalizedTime.getCalendar().get( Calendar.MILLISECOND ) );
    }
View Full Code Here

Examples of org.apache.directory.shared.util.GeneralizedTime

     */
    @Test
    public void testFractionOfMinute2() throws ParseException
    {
        String gt = "200801021213,125Z";
        GeneralizedTime generalizedTime = new GeneralizedTime( gt );
        String result = generalizedTime.toGeneralizedTime();
        assertEquals( gt, result );
        assertEquals( 7, generalizedTime.getCalendar().get( Calendar.SECOND ) );
        assertEquals( 500, generalizedTime.getCalendar().get( Calendar.MILLISECOND ) );
    }
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.