Timestamp timezone in audit logs

Hi,

I have activated audit logs in my PI test server and I saw something thats doesn’t seems normal.

There is a field “duration” that seems to calculate the difference between timestamp and startdate.

This 2 dates are not on the same timezone, timestamp is UTC and startdate in local timezone (the one configured on the server), so the difference is negative

I didn’t find any configuration of timezone on PI configuration or documentation and I don’t know if it is something important (not for my usage of logs).

Everything is working fine but it’s quite strange to see that in logs.

log exemple:
{“action”: “GET /audit/”, “action_detail”: “”, “administrator”: “admin”, “client”: “1.2.3.4”, “container_serial”: null, “container_type”: null, “duration”: “-1 day, 22:00:00.263072”, “info”: “”, “policies”: “”, “privacyidea_server”: "pi-test.local.net, “realm”: null, “resolver”: null, “serial”: null, “startdate”: “2026-06-02T12:28:04.709845”, “success”: true, “thread_id”: “125708218480320”, “timestamp”: “2026-06-02T10:28:04.972904”, “token_type”: null, “user”: null, “user_agent”: “privacyIDEA-WebUI”, “user_agent_version”: “3.13”}

PI version: 3.13 on ubuntu 24.04

Hi, thanks for sharing your observation. Which audit module are you using? Logger audit?
There is no timezone configuration option provided. Usually, everything should be logged in UTC, but some code still misses this. This seems to be the case for the logger audit. I’ll create an issue on GitHub, and we’re gonna fix this.

This is loggeraudit yes.