I am using MongoDB Charts, and one of my tables looks like this:
By default, MongoDB uses the UTC timezone. However, I want to handle timezones dynamically.
On the frontend, I send the start
and end
times based on the user’s selected timezone.
The issue arises when filtering by month. For example, if the user filters for September, the frontend sends the time in UTC+1. However, since MongoDB treats the data in UTC, this results in showing September along with 1 hour of August.
Is there a way to send the timezone from the frontend and have MongoDB process the time fields based on that timezone?