Skip to contentSkip to conversation

$(DATE) out of sync with system

Buildroot Mike Sander 3 participants 5 messages May 9, 2008 – May 12, 2008

lore
Share & tools
lore
#0 lore raw

I have Custom rootfs suffix set to the default $(DATE). I have noticed
that a few hours before midnight my rootfs.arm-yyyymmdd.romfs, the dd portion advances prematurely. this breaks a script I have to copy binaries after the build.

I suspect it is somehow related to DATE not using the timezone correctly (maybe I dont have it set correctly?). I have attempted to find where DATE is being set. I would imaging that it is using the "date" function
& format specifiers. Unfortunately DATE is a VERY common symbol under
buildroot. I am unable to locate where this symbol is initially set.

Can someone tell me where to look?

Thanks,

Mike

#1 lore raw
Quoted 5 lines

I have Custom rootfs suffix set to the default $(DATE). I have noticed
that a few hours before midnight my rootfs.arm-yyyymmdd.romfs, the dd portion advances prematurely. this breaks a script I have to copy binaries after the build.

Quoted 8 lines

I suspect it is somehow related to DATE not using the timezone correctly (maybe I dont have it set correctly?). I have attempted to find where DATE is being set. I would imaging that it is using the "date" function
& format specifiers. Unfortunately DATE is a VERY common symbol under
buildroot. I am unable to locate where this symbol is initially set.

Can someone tell me where to look?

Top Makefile

Best Regards
Ulf Samuelsson

#2 lore raw
Quoted 11 lines · Ulf Samuelsson
Quoted 11 lines

I have Custom rootfs suffix set to the default $(DATE). I have noticed
that a few hours before midnight my rootfs.arm-yyyymmdd.romfs, the dd portion advances prematurely. this breaks a script I have to copy binaries after the build.

I suspect it is somehow related to DATE not using the timezone correctly (maybe I dont have it set correctly?). I have attempted to find where DATE is being set. I would imaging that it is using the "date" function
& format specifiers. Unfortunately DATE is a VERY common symbol under
buildroot. I am unable to locate where this symbol is initially set.

Quoted 7 lines
Quoted 3 lines

Can someone tell me where to look?

Top Makefile

Thanks. I had done a multi level grep for "DATE" and "="..... but this generated literally hundreds of lines of output..... that proverbial needle in the hay stack.

The relevant line does the following DATE:= $(shell date -u +%Y%m%d). Anyone know why the "-u" which specifies Coordinated Universal Time? This explains the rollover I see a few hours before midnight. Would it
not make more sense for this just to be local time? FWIW... I can
update my script to be consistent with the DATE logic now that I know what is going on.

Regards,

Mike

Quoted 11 lines

Best Regards
Ulf Samuelsson

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.84beta3a (P3Scan 2.2.1)
AntiSpam: SpamAssassin 3.2.3
by Markus Madlener @ http://www.copfilter.org

#3 lore raw

fre 2008-05-09 klockan 12:34 -0400 skrev Mike Sander:

Quoted 23 lines
Quoted 11 lines · Ulf Samuelsson
Quoted 11 lines

I have Custom rootfs suffix set to the default $(DATE). I have noticed
that a few hours before midnight my rootfs.arm-yyyymmdd.romfs, the dd portion advances prematurely. this breaks a script I have to copy binaries after the build.

I suspect it is somehow related to DATE not using the timezone correctly (maybe I dont have it set correctly?). I have attempted to find where DATE is being set. I would imaging that it is using the "date" function
& format specifiers. Unfortunately DATE is a VERY common symbol under
buildroot. I am unable to locate where this symbol is initially set.

Quoted 7 lines
Quoted 3 lines

Can someone tell me where to look?

Top Makefile

Thanks. I had done a multi level grep for "DATE" and "="..... but this generated literally hundreds of lines of output..... that proverbial needle in the hay stack.

Quoted 7 lines

The relevant line does the following DATE:= $(shell date -u +%Y%m%d). Anyone know why the "-u" which specifies Coordinated Universal Time? This explains the rollover I see a few hours before midnight. Would it
not make more sense for this just to be local time? FWIW... I can
update my script to be consistent with the DATE logic now that I know what is going on.

No you are right, I think it should use local time, so I will fix this.

Signature · 2 lines
Best Regards,
Ulf Samuelsson
#4 lore raw
Quoted 34 lines · Ulf Samuelsson

fre 2008-05-09 klockan 12:34 -0400 skrev Mike Sander:

Quoted 24 lines
Quoted 11 lines · Ulf Samuelsson
Quoted 11 lines

I have Custom rootfs suffix set to the default $(DATE). I have noticed
that a few hours before midnight my rootfs.arm-yyyymmdd.romfs, the dd portion advances prematurely. this breaks a script I have to copy binaries after the build.

I suspect it is somehow related to DATE not using the timezone correctly (maybe I dont have it set correctly?). I have attempted to find where DATE is being set. I would imaging that it is using the "date" function
& format specifiers. Unfortunately DATE is a VERY common symbol under
buildroot. I am unable to locate where this symbol is initially set.

Quoted 7 lines
Quoted 4 lines

Can someone tell me where to look?

Top Makefile

Thanks. I had done a multi level grep for "DATE" and "="..... but this generated literally hundreds of lines of output..... that proverbial needle in the hay stack.

Quoted 8 lines

The relevant line does the following DATE:= $(shell date -u +%Y%m%d). Anyone know why the "-u" which specifies Coordinated Universal Time? This explains the rollover I see a few hours before midnight. Would it
not make more sense for this just to be local time? FWIW... I can
update my script to be consistent with the DATE logic now that I know what is going on.

Quoted 4 lines

No you are right, I think it should use local time, so I will fix this.

Thank You..

Mike