I just knocked up a little timestamp / build number generation tool that might be of use to other freaks: https://github.com/kuro68k/times...
You can use it as part of the pre-build commands in Atmel Studio or from your makefile. It spits out a timestamp as an int (epoch 01/01/2000 or 01/01/1970) and optionally an incremental build number. Redirect the output to a file that you can then #include in your code.
I also included a little batch file (Windows only I'm afraid, I'm sure Unix gurus can make their own) which creates a copy of every build you do, along with the .map file. I've found this to be useful in the past - someone comes to you with a firmware issue from an old build and you have use the .map file to peek and poke its memory for hints.
It's a rather trivial little tool, but I couldn't find anything similar for Windows. It should compile on Unix too, the code is fully portable.