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

Wrong time format in event logs of operations #2966

Open
koncentrat11 opened this issue Apr 27, 2024 · 1 comment
Open

Wrong time format in event logs of operations #2966

koncentrat11 opened this issue Apr 27, 2024 · 1 comment
Labels

Comments

@koncentrat11
Copy link

Whenever I export the event logs of an operation, the time in the "operation_name" seems correct, but all the others are off by 2 hours, e.g., "operation_name": "Test (4/27/2024 4:13:00 PM", and "operation_start": "2024-04-27T14:13:04Z". The right time is the one in the "operation name", and is aligned with the time of the VM running Caldera. How to fix?

@guillaume-duong-bib
Copy link

guillaume-duong-bib commented Apr 29, 2024

The web interface displays time in your local timezone, a.k.a. UTC+2 for you, but the times are stored in UTC.
The reason why the event logs has "operation_name": "Test (4/27/2024 4:13:00 PM)" is because when you restart an operation, the current time gets appended. Since it's only a string (name = ma.fields.String(required=True)) and not an actual time (start = ma.fields.DateTime(format=BaseObject.TIME_FORMAT, dump_only=True)), it will not be updated to any timezone once set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants