Open jacol84 opened 9 months ago
Looks like the morgan library only outputs UTC, based on this part of the README. That would explain why the TZ
just gets ignored.
It's possible to use a third party library to format the date respecting the timezone, as seen in this article.
However, the date would need to match the Apache Common Log Format (CLF) format which is: "10/Oct/2000:13:55:36 +0000"
.
In the code currently the combined
line format is:
:remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"
So I think it would require replacing the :date[clf]
bit with a custom date token.
I don't know how to set the time zone variable, an example that works is mariadb:latest, amazoncorretto:21
this is example docker-compose.yaml: