Skip to content

Commit

Permalink
fix: User timezone not being respected on Current Chat's filter (#30204)
Browse files Browse the repository at this point in the history
  • Loading branch information
murtaza98 committed Aug 30, 2023
1 parent 04fe492 commit 93d5a5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-roses-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fix: User timezone not being respected on Current Chat's filter
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ const currentChatQuery: useQueryType = (
if (from || to) {
query.createdAt = JSON.stringify({
...(from && {
start: moment(new Date(from)).set({ hour: 0, minutes: 0, seconds: 0 }).format('YYYY-MM-DDTHH:mm:ss'),
start: moment(new Date(from)).set({ hour: 0, minutes: 0, seconds: 0 }).toISOString(),
}),
...(to && {
end: moment(new Date(to)).set({ hour: 23, minutes: 59, seconds: 59 }).format('YYYY-MM-DDTHH:mm:ss'),
end: moment(new Date(to)).set({ hour: 23, minutes: 59, seconds: 59 }).toISOString(),
}),
});
}
Expand Down

0 comments on commit 93d5a5c

Please sign in to comment.