fix: select correct worktime for given day
This commit is contained in:
parent
79da91df00
commit
8ec8d481b8
|
|
@ -68,7 +68,7 @@ export class AnomalyDetectorService {
|
||||||
day: Date,
|
day: Date,
|
||||||
): Promise<WorkTime | undefined> {
|
): Promise<WorkTime | undefined> {
|
||||||
let startOfGivenDay: Date;
|
let startOfGivenDay: Date;
|
||||||
if (day.getHours() >= 0 && day.getHours() < 3) {
|
if (day.getHours() >= 0 && day.getHours() < 2) {
|
||||||
startOfGivenDay = addDays(day, -1);
|
startOfGivenDay = addDays(day, -1);
|
||||||
} else {
|
} else {
|
||||||
startOfGivenDay = startOfDay(day);
|
startOfGivenDay = startOfDay(day);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue