Skip to content

Commit

Permalink
fix(events): subtract hours
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveirabalsa committed Jul 26, 2023
1 parent 74e83ad commit 0563aad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/event/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class EventService {

return events.map((event) => {
const eventStartDate = dayjs(event.startDate);
if (dayjs(eventStartDate).isBefore(currentTime)) {
if (dayjs(eventStartDate).isBefore(currentTime.subtract(3, 'hour'))) {
event.status = 'DONE';
}
return event;
Expand Down

0 comments on commit 0563aad

Please sign in to comment.