Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞[BUG] Misleading timezone conversion during policy creation #1194

Open
ds-crehm opened this issue Jul 9, 2024 · 0 comments
Open

🐞[BUG] Misleading timezone conversion during policy creation #1194

ds-crehm opened this issue Jul 9, 2024 · 0 comments
Assignees
Labels
4 - Policy Management backend Backend related issues bug Something isn't working frontend Frontend related Issues R24.8

Comments

@ds-crehm
Copy link
Contributor

ds-crehm commented Jul 9, 2024

Description

Happened during testing of #639 on E2E and Dev/Test:
The timezone used for the validUntil date when creating policies is unclear to the user. The date is shown differently in different instances.

Current behaviour

When creating policies from the frontend, one can only input a validUntil time that is in the future. The timezone checked for is the local time.
Image
Image

After creating the policy with a valid timestamp, it is shown with the same timestamp in the detail view:
Image

But in the table view, it is shown in a different timezone:
Image

In the backend it is stored like that as well:
Image
1720535580 converted is 09.07.2024 16:33:00
(But the validUntil date above is the 'correct' one)

When creating policies from the backend, the verification happens with the different timezone, which means I can effectively create policies that are already expired. This should not be possible.

Backend:
Validation works:
Image

Validation does not work for policies <2 hours in the past:
Image

Frontend detail view:
Image

Expected behavior

The validUntil time is always in the timezone of the current user. There is no conversion to a different timezone, as this will only cause confusion.

Steps to reproduce the Bug

  1. Log in as admin
  2. Create policy with validUntil timestamp
  3. Look at validUntil timestamp in the detail view and compare it to the validUntil timestamp in the table view

Alternatively:

  1. Create policy in the backend with validUntil timestamp <2 hours in the past
  2. Policy will be created
  3. Look at policy in frontend and compare validUntil timestamps
@ds-crehm ds-crehm added bug Something isn't working frontend Frontend related Issues backend Backend related issues 4 - Policy Management labels Jul 9, 2024
@mkanal mkanal added the R24.8 label Jul 23, 2024
@mkanal mkanal changed the title [BUG] Misleading timezone conversion during policy creation 🐞[BUG] Misleading timezone conversion during policy creation Jul 23, 2024
@ds-mwesener ds-mwesener self-assigned this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Policy Management backend Backend related issues bug Something isn't working frontend Frontend related Issues R24.8
Projects
Status: backlog
Development

No branches or pull requests

3 participants