When looking at a value whose property type is set to date in the collection mapping, the Kuzzle admin console automatically formats the timestamp to a human-readable date string.
The issue is that this string takes into account the timezone that the user agent is currently in, leading to false readings in some situations.
A prime example of that would be the nextExecution field, that can be seen in scheduled tasks (for the Kuzzle Scheduler plugin) or in scheduled workflows (for the Kuzzle Workflows plugin), which contains the timestamp at which the next execution of a task/workflow is planned:
In the above screenshot, the Kuzzle admin console incorrectly displays the next execution as taking place at 04 AM, where in reality it will be executed at 02 AM.
Expected Behavior
The displayed date is using the GMT timezone.
Current Behavior
The displayed date is using the user agent timezone.
When looking at a value whose property type is set to
date
in the collection mapping, the Kuzzle admin console automatically formats the timestamp to a human-readable date string.The issue is that this string takes into account the timezone that the user agent is currently in, leading to false readings in some situations.
A prime example of that would be the
nextExecution
field, that can be seen in scheduled tasks (for the Kuzzle Scheduler plugin) or in scheduled workflows (for the Kuzzle Workflows plugin), which contains the timestamp at which the next execution of a task/workflow is planned:In the above screenshot, the Kuzzle admin console incorrectly displays the next execution as taking place at 04 AM, where in reality it will be executed at 02 AM.
Expected Behavior
The displayed date is using the GMT timezone.
Current Behavior
The displayed date is using the user agent timezone.
Possible Solution
In places that formats the date using
toLocaleString
(DocumentListItem.vue, TimeSeries.vue, TableCell.vue), set thetimeZone
option toUTC
, such as:Steps to Reproduce
16/05/2023, 02:00:00
(for CEST/GMT+2), where it should be16/05/2023, 00:00:00
.Context (Environment)
Kuzzle version: 2.24.0 Node.js version: v16.18.0 Admin Console version: 4.3.2