corrected times for missing values
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package de.jottyfan.timetrack.spring.done;
|
package de.jottyfan.timetrack.spring.done;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ public class SummaryBean implements Serializable {
|
|||||||
* @return the start
|
* @return the start
|
||||||
*/
|
*/
|
||||||
public String getStart() {
|
public String getStart() {
|
||||||
LocalDateTime found = LocalDateTime.now();
|
LocalDateTime found = LocalDate.now().atTime(23, 59);
|
||||||
for (DoneBean bean : list) {
|
for (DoneBean bean : list) {
|
||||||
LocalDateTime ldt = bean.getTimeFrom();
|
LocalDateTime ldt = bean.getTimeFrom();
|
||||||
if (ldt != null && ldt.isBefore(found)) {
|
if (ldt != null && ldt.isBefore(found)) {
|
||||||
@ -36,7 +37,7 @@ public class SummaryBean implements Serializable {
|
|||||||
* @return the end
|
* @return the end
|
||||||
*/
|
*/
|
||||||
public String getEnd() {
|
public String getEnd() {
|
||||||
LocalDateTime found = LocalDateTime.now();
|
LocalDateTime found = LocalDate.now().atTime(0, 0);
|
||||||
for (DoneBean bean : list) {
|
for (DoneBean bean : list) {
|
||||||
LocalDateTime ldt = bean.getTimeUntil();
|
LocalDateTime ldt = bean.getTimeUntil();
|
||||||
if (ldt != null && found.isBefore(ldt)) {
|
if (ldt != null && found.isBefore(ldt)) {
|
||||||
|
Reference in New Issue
Block a user