Timestamp parsing issue in logs
Current and expected behavior
I think there is an issue in the timestamp pattern used when parsing/showing logs for a pod.
When timestamps are hidden, all logs are prefixed with 2:00 and when they are shown it looks like this :
2024-08-23 11:00:40.650Z 2:00 {"timestamp":"2024-08-23T11:00:40.649+0200","level": "INFO", ...
As you can see we are using a json logger, we also log the timestamp in our json and that we are on +0200 but the timestamp added by aptakube is in +0000 except its actually the wrong time and the zone suffix just kind of shows before the json.
Its probably an easy fix, you should just need to adapt the pattern used to parse the timestamp in order to handle zoned timestamps as well as zulu.
Cheers
Environment & Operating System
Windows 10 Kubernetes 1.27
This is because we assumed every cluster would be on UTC timezone :)
I’m planning some big rework on logs streaming and I’ll include this fix too
Should be fixed on 1.12.0