The timezone in the last-modified header is specified incorrectly. #13433

Closed
opened 2025-11-02 10:42:11 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @phi-friday on GitHub (Aug 28, 2024).

Description

The date uses utc, but the calculated time was entered correctly.
However, last-modified is the correct time, but the timezone is specified as utc.
The same goes for the if-modified-since header in request.
The current time is 2024-08-28T04:24:31.699596+00:00,
so the last modified time of Wed, 28 Aug 2024 13:08:50 GMT is obviously wrong.

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

url: https://<some domain>/<owner>/<repo>/src/branch/main/<sub paths...>/<some file>

스크린샷 2024-08-28 오후 1 14 12

url: https://<some domain>/<owner>/<repo>/raw/branch/main/<sub paths...>/<some file>

스크린샷 2024-08-28 오후 1 14 30

Git Version

No response

Operating System

No response

How are you running Gitea?

services:
  repository:
    container_name: git-server
    image: gitea/gitea:1.22.1
    restart: always
    env_file:
      - .env
    ports:
      - "127.0.0.1:${GITEA_SSH_PORT}:22"
    networks:
      - public-network
    command:
      - sh
      - -c
      - |
        sh /init.sh
        /bin/s6-svscan /etc/s6
    environment:
      - TZ=Asia/Seoul
    volumes:
      - git-server:/data
      - type: bind
        source: "/home/${GITEA_SSH_USER_NAME}/.ssh"
        target: "/data/git/.ssh"
        read_only: false
      - type: bind
        source: "./app.ini.default"
        target: "${GITEA_APP_DEFAULT_PATH}"
        read_only: true
      - type: bind
        source: "./init.sh"
        target: "/init.sh"
        read_only: true
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
    extra_hosts:
      - ${COMMON_PROXY_LOCAL_HOST}:host-gateway
      - ${COMMON_ADDITIONAL_PROXY_LOCAL_HOST}:host-gateway
    logging:
      options:
        max-size: 10m
        max-file: 1

Database

PostgreSQL

Originally created by @phi-friday on GitHub (Aug 28, 2024). ### Description The `date` uses `utc`, but the calculated time was entered correctly. However, `last-modified` is the correct time, but the timezone is specified as `utc`. The same goes for the `if-modified-since` header in `request`. The current time is `2024-08-28T04:24:31.699596+00:00`, so the last modified time of `Wed, 28 Aug 2024 13:08:50 GMT` is obviously wrong. ### Gitea Version 1.22.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ## url: `https://<some domain>/<owner>/<repo>/src/branch/main/<sub paths...>/<some file>` ![스크린샷 2024-08-28 오후 1 14 12](https://github.com/user-attachments/assets/10aa0998-0855-4f93-ae30-bb647fd84161) ## url: `https://<some domain>/<owner>/<repo>/raw/branch/main/<sub paths...>/<some file>` ![스크린샷 2024-08-28 오후 1 14 30](https://github.com/user-attachments/assets/5850dc82-519e-4d0f-933d-b5dcea63c571) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? ```yaml services: repository: container_name: git-server image: gitea/gitea:1.22.1 restart: always env_file: - .env ports: - "127.0.0.1:${GITEA_SSH_PORT}:22" networks: - public-network command: - sh - -c - | sh /init.sh /bin/s6-svscan /etc/s6 environment: - TZ=Asia/Seoul volumes: - git-server:/data - type: bind source: "/home/${GITEA_SSH_USER_NAME}/.ssh" target: "/data/git/.ssh" read_only: false - type: bind source: "./app.ini.default" target: "${GITEA_APP_DEFAULT_PATH}" read_only: true - type: bind source: "./init.sh" target: "/init.sh" read_only: true - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" extra_hosts: - ${COMMON_PROXY_LOCAL_HOST}:host-gateway - ${COMMON_ADDITIONAL_PROXY_LOCAL_HOST}:host-gateway logging: options: max-size: 10m max-file: 1 ``` ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 10:42:11 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13433