aptakube icon indicating copy to clipboard operation
aptakube copied to clipboard

Timestamp parsing issue in logs

Open meier-christoph opened this issue 1 year ago • 1 comments

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

meier-christoph avatar Aug 23 '24 09:08 meier-christoph

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

goenning avatar Aug 23 '24 10:08 goenning

Should be fixed on 1.12.0

goenning avatar Jul 22 '25 12:07 goenning