Skip to content

💡Option to Use Local Timezone in Log Output #1530

@lxxilyd

Description

@lxxilyd

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 <tz> (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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: NormalMinor issue impacting one or more usersType: Feature RequestA big idea that would be split into smaller pieces

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions