Package org.joda.time

Examples of org.joda.time.LocalTime.toDateTimeToday()


       
        try {     
          DateTimeFormatter formatter = DateTimeFormat.forPattern("HH:mm:ss");
          finalStartTime = formatter.parseDateTime(startTime);
          LocalTime localDateTime = finalStartTime.toLocalTime();
          finalStartTime = localDateTime.toDateTimeToday();
         
           PeriodFormatter pFormatter= new PeriodFormatterBuilder()
             .appendHours()
             .appendSeparator(":")
             .appendMinutes()
View Full Code Here


    }

    @Test
    public void testLocalTimeConverter() throws ConverterException {
        LocalTime lt = LocalTime.now();
        oracle.sql.TIMESTAMP oracleTime = new TIMESTAMP(new Timestamp(lt.toDateTimeToday().getMillis()));
        LocalTime convertedTime = Convert.getConverterIfExists(LocalTime.class).convert(oracleTime);

        assertEquals(lt, convertedTime);
    }
}
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.