cloudflare / cloudflare/cloudflared

💡Option to Use Local Timezone in Log Output

Open
#1,530 0 comments 5 reactions 0 assignees View on GitHub
Priority: Normal Type: Feature Request
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Hello Cloudflare team,

Currently, cloudflared always outputs log timestamps in UTC with ISO 8601 format, for example:

`{"level":"info","time":"2025-09-07T13:19:18Z","message":"Registered tunnel connection"}`

Even when the system timezone or the TZ environment variable is set (e.g., TZ=Asia/Shanghai), cloudflared continues to log in UTC.

For users who run cloudflared on systems with a local timezone configured, it would be very helpful to have an option to use local time (or specify a timezone) in log output. This makes it easier to correlate logs with other local services and system events.
Feature Proposal:
Add a flag or config option, for example:

`--log-local-time (boolean)
or --log-timezone (e.g., Asia/Shanghai)
or use environment timezone (e.g., export TZ=Asia/Shanghai)
`

When enabled, log timestamps would be converted to the specified timezone instead of always using UTC.

This feature would make debugging and monitoring easier for users who prefer to see timestamps in their local time.

Thank you for considering this improvement!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.