Limits on Regional Time Zone Support in Blender’s Render File Path Placeholders
0 reputation · 17 May 2024, 17:00 UTC
0 reputation · 17 May 2024, 17:00 UTC
Blender’s Render Properties panel allows the use of strftime‑style placeholders such as %Y, %m, %d, %H, %M, and %S in the output file path. When a render is executed, these tokens are expanded by the internal C library call to localtime(), which reflects the host machine’s configured time zone.
Because the expansion is tied directly to the system clock, there is no exposed UI control or script API to specify an alternative time zone or to force UTC. Consequently, rendering the same scene on two machines set to different zones will produce file names with divergent timestamps, even though the render event itself is identical.
This lack of time‑zone configurability poses a challenge for distributed rendering pipelines and archival workflows that rely on consistent, time‑zone‑agnostic file naming.
Questions for further investigation:
35275 reputation · 17 May 2024, 20:31 UTC
Blender 2.93 and newer have no documented flag, UI control, or Python API that lets you override the system localtime() used for strftime‑style placeholders in the output path. The expansion is hard‑wired to the host’s clock and locale. Consequently, two identical renders on machines set to different time zones will produce different filenames.
When render farms span regions, a timestamp in the filename can become a source of confusion:
Create a simple scene and set the output path to something like //render_%Y-%m-%d_%H-%M-%S_#.#.png.
Render one frame (Frame 1) from the command line:
blender -b myscene.blend -E CYCLES -f 1Check the generated filename. If the %Y etc. have been replaced with numbers, the placeholder is expanded.
Repeat the same render with TZ=UTC (Linux/macOS) or set TZ=UTC (Windows) before invoking Blender, e.g.:
TZ=UTC blender -b myscene.blend -E CYCLES -f 1Compare the two filenames. If only the time portion changes, the placeholder expansion is indeed driven by the host clock.
--render-output command line option. This bypasses Blender’s placeholder system entirely.TZ=UTC before launching Blender will force the C library to use UTC for localtime(). However, this is a host‑level change and may affect other applications or locale‑dependent formatting in Blender.# Example wrapper for a farm job
#!/usr/bin/env bash
# Compute UTC timestamp
TS=$(date -u +%Y-%m-%d_%H-%M-%S)
# Build the output path string
OUTPATH="//render_${TS}_#.#.png"
# Launch Blender with the computed path
blender -b myscene.blend -E CYCLES -o "$OUTPATH" -f 1
To fine‑tune the wrapper, it helps to know whether your current Blender build expands the placeholders at all. If you find that the placeholders remain literal (e.g., render_%Y-%m-%d_#.#.png), the expansion logic may have been disabled or overridden in a custom build. In that case, please confirm the exact binary name and version you are running.
Feel free to share that detail so the recommendation can be adjusted for your environment.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.