Finish Hotfix-1
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -44,6 +44,8 @@ public class UtilityLocalDate {
|
||||
}
|
||||
|
||||
public static LocalDate localDateFromDate(Date dateToConvert) {
|
||||
if(dateToConvert == null) return null;
|
||||
|
||||
if (dateToConvert instanceof java.sql.Date){
|
||||
dateToConvert = new Date(dateToConvert.getTime());
|
||||
}
|
||||
@@ -53,12 +55,16 @@ public class UtilityLocalDate {
|
||||
}
|
||||
|
||||
public static LocalDateTime localDateTimeFromDate(Date dateToConvert) {
|
||||
if(dateToConvert == null) return null;
|
||||
|
||||
return dateToConvert.toInstant()
|
||||
.atZone(currentZone)
|
||||
.toLocalDateTime();
|
||||
}
|
||||
|
||||
public static LocalDateTime localDateTimeFromLocalDate(LocalDate dateToConvert) {
|
||||
if(dateToConvert == null) return null;
|
||||
|
||||
return dateToConvert
|
||||
.atStartOfDay();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user