forked from plusone/plusone-commons
优化代码
parent
b86bb6c15b
commit
c7ed383382
|
@ -13,7 +13,6 @@ import java.util.Date;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.joda.time.DateTimeZone;
|
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
|
@ -104,7 +103,7 @@ public class DateTimeTools {
|
||||||
* @deprecated 使用 {@link ZonedDateTime#toInstant()}
|
* @deprecated 使用 {@link ZonedDateTime#toInstant()}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static Instant toInstant(ZonedDateTime zonedDateTime) {
|
public static Instant toInstant(ZonedDateTime zonedDateTime) { // NOSONAR
|
||||||
return zonedDateTime.toInstant();
|
return zonedDateTime.toInstant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +176,7 @@ public class DateTimeTools {
|
||||||
* @deprecated 使用 {@link ZonedDateTime#of(LocalDateTime, ZoneId)}
|
* @deprecated 使用 {@link ZonedDateTime#of(LocalDateTime, ZoneId)}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static ZonedDateTime toZonedDateTime(LocalDateTime localDateTime, ZoneId zone) {
|
public static ZonedDateTime toZonedDateTime(LocalDateTime localDateTime, ZoneId zone) { // NOSONAR
|
||||||
return ZonedDateTime.of(localDateTime, zone);
|
return ZonedDateTime.of(localDateTime, zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +321,7 @@ public class DateTimeTools {
|
||||||
return jodaZone.toTimeZone().toZoneId();
|
return jodaZone.toTimeZone().toZoneId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DateTimeZone toJodaTime(java.time.ZoneId zone) {
|
public static org.joda.time.DateTimeZone toJodaTime(java.time.ZoneId zone) {
|
||||||
return org.joda.time.DateTimeZone.forID(zone.getId());
|
return org.joda.time.DateTimeZone.forID(zone.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue