Skip to content

Docker: Timezone #7123

Closed
Closed
@noboevbo

Description

@noboevbo
  • Gitea version (or commit ref): 1.8.2
  • Git version: 2.20.1
  • Operating system: Docker (Official Image)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

There seems to be a problem with the time zone for OpenSSH. In principle I pass the time zone as environment variable via Docker-Compose (- TZ=Europe/Berlin). The gitea logs have the correct timestamp. The SSH logs have a different timestamp, which causes problems when using fail2ban.

Example output:

`

docker logs gitea
Jun 4 11:19:06 syslogd started: BusyBox v1.29.3
Jun 4 09:19:06 sshd[19]: Server listening on :: port 22.
Jun 4 09:19:06 sshd[19]: Server listening on 0.0.0.0 port 22.
2019/06/04 11:19:06 [T] AppPath: /app/gitea/gitea
`

I already tried to set the timezone manually on top of the entrypoint script like this:
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && /usr/bin/entrypoint
The date is set correctly (e.h. when executing date), but the sshd log is still showing the wrong time. Does anyone have any idea what else could be wrong with that? Is the timezone possibly not taken over correctly by s6?

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions