microReticulumTbeam/exercises/24_nvs/scripts/set_build_epoch.py
2026-04-24 16:31:03 -07:00

13 lines
274 B
Python

import time
Import("env")
epoch = int(time.time())
utc_tag = time.strftime("%Y%m%d_%H%M%S", time.gmtime(epoch))
env.Append(
CPPDEFINES=[
("BUILD_EPOCH", str(epoch)),
("FW_BUILD_EPOCH", str(epoch)),
("FW_BUILD_UTC", '\"%s\"' % utc_tag),
]
)