Java LocalTime Create toLocalTime(java.sql.Time t)

Here you can find the source of toLocalTime(java.sql.Time t)

Description

to Local Time

License

Apache License

Declaration

public static LocalTime toLocalTime(java.sql.Time t) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.joda.time.DateTimeZone;

import org.joda.time.LocalTime;

public class Main {
    public static LocalTime toLocalTime(java.sql.Time t) {
        // TODO - confirm this conversion always works, esp. across timezones
        LocalTime lt = (t == null ? null : new LocalTime(t, DateTimeZone.UTC));
        return lt;
    }//from  w  w  w  .j  av  a 2  s  . c  o m

    public static LocalTime toLocalTime(Integer i) {
        LocalTime lt = (i == null ? null : LocalTime.fromMillisOfDay(i));
        return lt;
    }

    public static LocalTime toLocalTime(String s) {
        LocalTime lt = (s == null ? null : new LocalTime(s));
        return lt;
    }
}

Related

  1. toLocalTime(java.sql.Time time)
  2. asLocalTime(Date date)