-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Milestone
Description
The existing endpoint:
GET /time-entries/summary
is facing issues because of the timezone that UI is using and the server where the backend is running. We need to allow the endpoint work consistently indicating the client time offset they have so the endpoint will work as follows:
GET /time-entries/summary?time_offset={offsetInMinutes}
By default, if time_offset is not provided, the app will use 300 which is where most of the users we have so far are. If a value is provided for this query parameter please use it taking into account what a time offset is for JavaScript (and most of the clients follow the same approach):
The getTimezoneOffset() method returns the time zone difference, in minutes, from current locale (host system settings) to UTC.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset