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

Allow setting local timezone for viewing logs #1302

Open
day1118 opened this issue Nov 14, 2021 · 2 comments · May be fixed by #2246 or #2544
Open

Allow setting local timezone for viewing logs #1302

day1118 opened this issue Nov 14, 2021 · 2 comments · May be fixed by #2246 or #2544
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@day1118
Copy link
Contributor

day1118 commented Nov 14, 2021




Is your feature request related to a problem? Please describe.
Logs are shown in UTC. IT is frustrating when trying to troubleshoot an issue and need to keep converting timestamps to determine which logs are relevant.

Describe the solution you'd like
I'd like to be able to pass an environment variable (TZ) which is used when showing logs so the timestamps represent my local timezone. This would also allow for setting to a non-local timezone if investigating behaviour with a remote team (as TZ could be set to match the customers location and work in their timezone)

Describe alternatives you've considered
Mounting /etc/timezone and /etc/localtime - not flexible for non-linux OS (mac etc)

Additional context
Changing the cluster configuration is not practical as the team is distributed, so there is no single zone for all users.
It would also be useful to optionally shorten/suppress the number of sub-second decimal places in the timestamp. Nine decimal places is probably more detail than normally needed.

@derailed derailed added enhancement New feature or request good first issue Good for newcomers labels Nov 17, 2021
@NOUIY
Copy link

NOUIY commented Jan 17, 2022




Is your feature request related to a problem? Please describe.
Logs are shown in UTC. IT is frustrating when trying to troubleshoot an issue and need to keep converting timestamps to determine which logs are relevant.

Describe the solution you'd like
I'd like to be able to pass an environment variable (TZ) which is used when showing logs so the timestamps represent my local timezone. This would also allow for setting to a non-local timezone if investigating behaviour with a remote team (as TZ could be set to match the customers location and work in their timezone)

Describe alternatives you've considered
Mounting /etc/timezone and /etc/localtime - not flexible for non-linux OS (mac etc)

Additional context
Changing the cluster configuration is not practical as the team is distributed, so there is no single zone for all users.
It would also be useful to optionally shorten/suppress the number of sub-second decimal places in the timestamp. Nine decimal places is probably more detail than normally needed.

(R)

@NOUIY
Copy link

NOUIY commented Jan 17, 2022 via email

DarkIsDude added a commit to DarkIsDude/k9s that referenced this issue Oct 12, 2023
DarkIsDude added a commit to DarkIsDude/k9s that referenced this issue Oct 12, 2023
DarkIsDude added a commit to DarkIsDude/k9s that referenced this issue Oct 12, 2023
ngc7293 added a commit to ngc7293/k9s that referenced this issue Feb 17, 2024
Support displaying logs timestamp in local rather than cluster time. The
option can be controlled from the log viewer with the 'z' key, or set in
the config yaml.
@ngc7293 ngc7293 linked a pull request Feb 17, 2024 that will close this issue
ngc7293 added a commit to ngc7293/k9s that referenced this issue Feb 17, 2024
Support displaying logs timestamp in local rather than cluster time. The
option can be controlled from the log viewer with the 'z' key, or set in
the config yaml.
DarkIsDude added a commit to DarkIsDude/k9s that referenced this issue May 27, 2024
DarkIsDude added a commit to DarkIsDude/k9s that referenced this issue May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
3 participants