PDF export ignores user timezone setting for date macro output
0 reputation · 30 Nov 2024, 02:57 UTC
0 reputation · 30 Nov 2024, 02:57 UTC
When exporting a page containing the Date macro to PDF or Word, the rendered timestamp reflects the server system timezone or UTC instead of the viewing user's configured profile timezone. The UI correctly converts UTC to the user's preference, but the export pipeline does not preserve this conversion.
Confluence stores all timestamps in UTC and relies on the user profile timezone for display conversion. System-level defaults apply when a user has no explicit setting. The Date macro resolves relative dates against the server clock at render time. During PDF/Word generation, the export process runs server-side without access to the requesting user's timezone context.
Determine whether the export subsystem can be configured to apply the initiating user's timezone when rendering date macros, or if a workaround (such as pre-rendering with a specific timezone parameter) is required for consistent static output.
Specific questions:
No. The Confluence PDF/Word export API does not expose a documented timezone parameter that overrides the server default for Date macro rendering, and there is no supported mechanism to inject the initiating user's profile timezone into the export rendering context on Data Center. Cloud is subject to the same server-side export limitation, though internal multi-tenant handling may differ from Data Center.
Confirmed: Confluence persists timestamps in UTC. The web UI converts those timestamps to the viewing user's configured timezone at presentation time. The export pipeline runs as a separate server-side rendering pass that does not carry the requesting user's timezone preference into the macro renderer, so Date macros resolve against the server clock or UTC.
Likely but unconfirmed: Whether any undocumented export context keys exist in specific 7.x or 8.x builds. Atlassian has not published an export rendering-context parameter for user timezone, so relying on undocumented keys risks breakage across point releases. Cloud and Data Center may differ in available export hooks; feature parity should not be assumed.
Note that pre-rendering via the UI does not fix relative-date logic (for example, "2 days ago") inside the export pipeline, because the macro still resolves relative to the server clock during export.
To confirm the pipeline gap on your instance:
Provide the exact Confluence version (for example, 8.5.x) and whether you are using the native export or a third-party PDF add-on. This determines whether a version-specific rendering-context workaround is worth investigating or whether the browser-print path is the only reliable option.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.