When uboot start, will show below:
U-Boot SPL 2021.04-lf_v2021.04+gf62650ba9e (Sep 06 2021 - 08:48:23 +0000)
Normal Boot
Trying to boot from MMC1
Primary set selected
Load image from MMC/SD 0x5e400
I think the "Sep 06 2021 - 08:48:23" is compile time, but why this time never change when rebuild uboot ?
The timestamp will be generated in include/timestamp_autogenerated.h when you first build uboot.
You can try to clean the uboot build file and rebuild it.
I had test on IMX8QM EVK with imx-yocto-L5.10.52_2.1.0
Step1 .bitbake u-boot-imx -c cleanall
Step2. bitbake u-boot-imx
Step3 .cd tmp/work/imx8qmmek-poky-linux/u-boot-imx/2021.04-r0/build/imx8qm_mek_defconfig/include/generated/
Step4.
$ cat timestamp_autogenerated.h
#define U_BOOT_DATE "Sep 06 2021"
#define U_BOOT_TIME "08:48:23"
#define U_BOOT_TZ "+0000"
#define U_BOOT_DMI_DATE "09/06/2021"
#define U_BOOT_BUILD_DATE 0x20210906
#define U_BOOT_EPOCH 1630918103
I think the build time not changed,
I check the Makefile in Uboot
I think the root cause is the SOURCE_DATE_EPOCH
But I don't know how to do next
You can check if SOURCE_DATE_EPOCH has been declared in your recipe, bbappend, local.conf or the U-boot makefile.
bitbake -e | grep SOURCE_DATE_EPOCH
I had the same issue and just found it declared in my local.conf file.