Skip to content

Commit

Permalink
Merge pull request #2087 from zetkin/issue-2079/dayjs.utc
Browse files Browse the repository at this point in the history
Replace 000Z suffix with dayjs.utc call
  • Loading branch information
richardolsson authored Sep 11, 2024
2 parents 241e275 + 982fbd3 commit baf6f1c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/features/tasks/utils/getTaskStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ const getTaskStatus = (task: ZetkinTask): TASK_STATUS => {
return TASK_STATUS.EXPIRED;
}

const isPublishedPassed =
published && dayjs(published + '.000Z').isBefore(now);
const isPublishedPassed = published && dayjs.utc(published).isBefore(now);

if (isPublishedPassed) {
return TASK_STATUS.ACTIVE;
Expand Down

0 comments on commit baf6f1c

Please sign in to comment.