How can I set a calculated value when my sketch is uploaded? I have an Arduino based countdown timer that counts down the number of minutes remaining to an event and displays them on an LCD. Since the event's start time is fixed, I have to re-calculate my countdown duration and update a constant in the sketch every time I upload it.

Is it possible to calculate the duration on the PC and set the starting value for the timer automatically? Perhaps using some kind of pre-compile script? Or perhaps through some kind of debugging features?

I'm not interested in adding RTC or other hardware to this project b/c (1) I don't have it handy and (2) there's very limited physical space in the already assembled project.

I'm currently using the Arduino IDE but I would be open to solutions that use other IDEs, or external components.
The C compilers provide two macros that resolve to string literals:  __DATE__ gives the time the file was compiled, and __TIME__ gives the current time of day. They output e.g. "May 31 2017" and "21:19:49"

You'd have to parse these string to get the time and do the calculations to get the remaining time.