tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
600 stars 106 forks source link

Time in logs seemed to be fixed to GMT #919

Closed yarafie closed 1 month ago

yarafie commented 1 month ago

Is there an existing issue for this?

Is this really a bug or just a usage/support question?

Have you read and followed any recommendations in the Support and Troubleshooting section of the wiki?

Did this issue start after an upgrade?

Are you prepared to respond and provide all relevant information (logs, screenshots, etc)

Describe the Bug

Running in docker compose doing the proper volume mounts and environment variable is not being honored

Steps to Reproduce

Change timezone in docker compose other than GMT

Expected Behavior

Honor the set timezone

Log Output

2024-10-22T07:24:42.079Z ring-attr [Breakfast Room] ring/[MASKED]/snapshot/attributes {"timestamp":1729581882,"type":"interval"}
2024-10-22T07:25:00.359Z ring-mqtt [Front Doorbell4] No event recording corresponding to Motion 1 was found in device event history
[MASKED@nucx:~]$ date
Tue Oct 22 10:25:21 AM +03 2024

Screenshots

No response

Config File

# ring-mqtt
  ring-mqtt:
    image: tsightler/ring-mqtt
    container_name: ring-mqtt
    volumes:
      - ./volumes/ring-mqtt/data:/data # Mapping of local folder to provide persistent storage
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Asia/Riyadh
    ports:            #ring-mqtt Enable RTSP port for external media player access
      - xxxx:8553     #ring-mqtt _PORT_
      - xxxx:5123      #ring-mqtt _PORT_
    depends_on:
      - mosquitto
      - homeassistant
    logging:                           #limit logs to 10m and 3 files
      options:
        max-size: 10m
        max-file: "3"
    labels:
      - "diun.enable=true"
    restart: unless-stopped

Install Type

docker compose

Version

latest [as of today]

Operating System

Ubuntu

Architecture

x86_64

Machine Details

Intel NUC

tsightler commented 1 month ago

This is not a bug, this is behaving as designed. This project uses debug package for all log output and debug package uses Javascript toISOString() function to create timestamps, which always produces UTC time.