Hi there @krasi-github it looks to me that Packer is not finding the environment variable BUILDTIME. So packer is processing the variable as an empty string.
Is the environment variable being persisted to the shell running Packer?
Depending on how the environment variable is being set you need to make sure that it is persisted so that it is available to other programs like Packer, by either using export BUILDTIME=somevalue on *nix systems or set BUILDTIME=somevalue on Windows systems.
Alternatively if it is a one time env variable you can set it when you call Packer, for example: BUILDTIME=somevalue packer build template.json
Lastly, I would like to mention that Packer has a timestamp function that you could use if you are looking to randomize the vm_name based off build times.