OK, that’s a good point, please ignore it.

//Ming Liu


On Wed, 2026-03-11 at 11:43 +0100, Ming Liu via lists.openembedded.org
> wrote:
> > DATETIME is being used in BUILD_ID and some other places to mark the
> > build time, let's use it as system timestamp, to have a consistent
> > system-wide timestamp.
> >
> > Signed-off-by: Ming Liu <[email protected]>
> > ---
> >  meta/classes-recipe/rootfs-postcommands.bbclass | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass
> b/meta/classes-recipe/rootfs-postcommands.bbclass
> > index f0c7ee658d..43001e09b5 100644
> > --- a/meta/classes-recipe/rootfs-postcommands.bbclass
> > +++ b/meta/classes-recipe/rootfs-postcommands.bbclass
> > @@ -424,11 +424,12 @@ rootfs_update_timestamp () {
> >               # Convert UTC into %4Y%2m%2d%2H%2M%2S
> >               sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS}
> +%4Y%2m%2d%2H%2M%2S`
> >       else
> > -             sformatted=`date -u +%4Y%2m%2d%2H%2M%2S`
> > +             sformatted=${DATETIME}
> >       fi
> >       echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp
> >       bbnote "rootfs_update_timestamp: set /etc/timestamp to $sformatted"
> >  }
> > +rootfs_update_timestamp[vardepsexclude] = "DATETIME"
>
> This could be a little tricky as this timestamp is meant to be the
> latest thing in the image. DATETIME is fixed when the build starts and
> therefore if files are modified during the image, those could have a
> later values.
>
> I'm therefore not sure this is a good idea.
>
> Cheers,
>
> Richard
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#232867): 
https://lists.openembedded.org/g/openembedded-core/message/232867
Mute This Topic: https://lists.openembedded.org/mt/118257815/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to