Skip to content

Add start/end build timestamps#114754

Open
adamscott wants to merge 3 commits intogodotengine:masterfrom
adamscott:add-time-build-start-end
Open

Add start/end build timestamps#114754
adamscott wants to merge 3 commits intogodotengine:masterfrom
adamscott:add-time-build-start-end

Conversation

@adamscott
Copy link
Member

@adamscott adamscott commented Jan 8, 2026

This PR adds a timestamp at the beginning of builds, and at the end also.

So many times, I trigger a build again because I cannot differentiate an old build from a new in my terminal.

Note

Updated my PR following @Calinou's suggestion.

Features:

  • New build option:
    • build_timestamp_timezone: Determines which timezone to use to print build timestamps in SCons terminal output. Defaults to `utc` (utc|system)
  • Uses datetime for all timestamp calculation (including the build time)

Start of the build

Plain text

❯ scons
scons: Reading SConscript files ...
INFO: (build started at 2026-01-08 20:02:16 UTC)

Picture

Capture d’écran, le 2026-01-08 à 15 02 44

End of the build

Plain text

[100%] scons: done building targets.
INFO: Time elapsed: 0:00:14.90 (build ended at 2026-01-08 20:02:31 UTC)

Picture

Capture d’écran, le 2026-01-08 à 15 05 08

@Calinou
Copy link
Member

Calinou commented Jan 8, 2026

This is an interesting idea, but I think showing the UTC time alone is enough (so it's more compact). If you really want to show local time, perhaps it should be done on the same line after UTC time.

All in all, I would try to compact the display from 3 lines to just 1. Maybe you can even put this information on the same line as "Time elapsed" as follows:

INFO: Time elapsed: 00:00:20.05 (build ended at 2026-01-08 14:49:26 UTC)

I would also clean up the timestamp a little to be more readable (remove milliseconds, and replace T with a space).

@adamscott
Copy link
Member Author

@Calinou I updated my PR following your suggestion!

@adamscott adamscott force-pushed the add-time-build-start-end branch from c7308b7 to c6f3020 Compare January 8, 2026 20:10
@adamscott adamscott force-pushed the add-time-build-start-end branch from c6f3020 to 4091325 Compare January 8, 2026 20:11
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected.

However, I'm not sure we need the added complexity from an option to choose between printing UTC and local time. I would settle on one or the other (but probably UTC, since it matches what Godot prints on startup for the Git commit date).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants