Skip to content

fix(ssh): display SSH login logs in server timezone - #13869

Merged
ssongliu merged 1 commit into
dev-v2from
pr@dev-v2@ssh-log-timezone
Sep 20, 2026
Merged

ssongliu merged 1 commit into
dev-v2from
pr@dev-v2@ssh-log-timezone

Conversation

@wanghe-fit2cloud

@wanghe-fit2cloud wanghe-fit2cloud commented Sep 20, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it?

Refs #13860. The SSH login log page formatted the date with the browser timezone, so when the client timezone differs from the server (e.g. server Asia/Taipei, browser Europe/Berlin) the displayed time was shifted by the offset while auth.log, the terminal and the CSV export all show server time.

Summary of your change

  • add dateFormatServerTimezone, which formats the timestamp using its own offset instead of converting it to the browser timezone
  • use it for the date column of the SSH login log page

The CSV export (agent/utils/csv_export/ssh_log.go) already formats Date with the location parsed from the log, so the page and the export are now consistent.

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

The SSH log page formatted dates with the browser timezone, so logs looked shifted when the client timezone differed from the server. Format the timestamp with the offset returned by the API so the page matches auth.log, the terminal and the CSV export. Refs #13860.
@ssongliu
ssongliu merged commit 65f6fdd into dev-v2 Sep 20, 2026
3 checks passed
@ssongliu
ssongliu deleted the pr@dev-v2@ssh-log-timezone branch September 20, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants