diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -396,7 +396,7 @@ @echo @false -STARTTIME!= LC_ALL=C date +STARTTIME!= date -Iseconds CHECK_TIME!= cmp=`mktemp`; find ${.CURDIR}/sys/sys/param.h -newer "$$cmp" && rm "$$cmp"; echo .if !empty(CHECK_TIME) .error check your date/time: ${STARTTIME} @@ -433,7 +433,7 @@ .endif @echo @echo "--------------------------------------------------------------" - @echo ">>> make world completed on `LC_ALL=C date`" + @echo ">>> make world completed on `date -Iseconds`" @echo " (started ${STARTTIME})" @echo "--------------------------------------------------------------" .else @@ -611,7 +611,7 @@ universe-toolchain: .PHONY universe_prologue @echo "--------------------------------------------------------------" - @echo "> Toolchain bootstrap started on `LC_ALL=C date`" + @echo "> Toolchain bootstrap started on `date -Iseconds`" @echo "--------------------------------------------------------------" ${_+_}@cd ${.CURDIR}; \ env PATH=${PATH:Q} ${SUB_MAKE} ${JFLAG} kernel-toolchain \ @@ -636,7 +636,7 @@ false; \ fi @echo "--------------------------------------------------------------" - @echo "> Toolchain bootstrap completed on `LC_ALL=C date`" + @echo "> Toolchain bootstrap completed on `date -Iseconds`" @echo "--------------------------------------------------------------" .for target in ${_UNIVERSE_TARGETS} @@ -644,7 +644,7 @@ universe_epilogue: universe_${target} universe_${target}: universe_${target}_prologue .PHONY universe_${target}_prologue: universe_prologue .PHONY - @echo ">> ${target} started on `LC_ALL=C date`" + @echo ">> ${target} started on `date -Iseconds`" universe_${target}_worlds: .PHONY .if !make(targets) && !make(universe-toolchain) @@ -703,7 +703,7 @@ universe_${target}_prologue: universe-toolchain .endif universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY - @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" + @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `date -Iseconds`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ TARGET=${target} \ @@ -713,7 +713,7 @@ (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ ${MAKEFAIL})) - @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" + @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `date -Iseconds`" .endfor .endif # ${__DO_WORLDS} == "yes" @@ -728,16 +728,16 @@ # Tell the user the worlds and kernels have completed universe_${target}: universe_${target}_done universe_${target}_done: - @echo ">> ${target} completed on `LC_ALL=C date`" + @echo ">> ${target} completed on `date -Iseconds`" .endfor .if make(universe_kernconfs) || make(universe_kernels) .if !defined(TARGET) TARGET!= uname -m .endif universe_kernels_prologue: .PHONY - @echo ">> ${TARGET} kernels started on `LC_ALL=C date`" + @echo ">> ${TARGET} kernels started on `date -Iseconds`" universe_kernels: universe_kernconfs .PHONY - @echo ">> ${TARGET} kernels completed on `LC_ALL=C date`" + @echo ">> ${TARGET} kernels completed on `date -Iseconds`" .if defined(MAKE_ALL_KERNELS) _THINNER=cat .elif defined(MAKE_LINT_KERNELS) @@ -761,7 +761,7 @@ .endif universe_kernconfs_${TARGET_ARCH_${kernel}}: universe_kernconf_${TARGET}_${kernel} universe_kernconf_${TARGET}_${kernel}: .MAKE - @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel started on `LC_ALL=C date`" + @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel started on `date -Iseconds`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ${SUB_MAKE} ${JFLAG} buildkernel \ TARGET=${TARGET} \ @@ -771,7 +771,7 @@ > _.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \ "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) - @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`" + @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `date -Iseconds`" .endfor .for target_arch in ${TARGET_ARCHES_${TARGET}} universe_kernconfs: universe_kernconfs_${target_arch} .PHONY @@ -781,7 +781,7 @@ universe: universe_epilogue universe_epilogue: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> make universe completed on `LC_ALL=C date`" + @echo ">>> make universe completed on `date -Iseconds`" @echo " (started ${STARTTIME})" @echo "--------------------------------------------------------------" .if defined(DOING_TINDERBOX) diff --git a/Makefile.inc1 b/Makefile.inc1 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -385,7 +385,7 @@ LINKER_FREEBSD_VERSION toolchain-metadata.mk: .PHONY .META @: > ${.TARGET} - @echo ".info Using cached toolchain metadata from build at $$(hostname) on $$(date)" \ + @echo ".info Using cached toolchain metadata from build at $$(hostname) on $$(date -Iseconds)" \ > ${.TARGET} @echo "_LOADED_TOOLCHAIN_METADATA=t" >> ${.TARGET} .for v in ${_TOOLCHAIN_METADATA_VARS} @@ -1283,13 +1283,13 @@ buildworld_prologue: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> World build started on `LC_ALL=C date`" + @echo ">>> World build started on `date -Iseconds`" @echo "--------------------------------------------------------------" buildworld_epilogue: .PHONY @echo @echo "--------------------------------------------------------------" - @echo ">>> World build completed on `LC_ALL=C date`" + @echo ">>> World build completed on `date -Iseconds`" @seconds=$$(($$(date '+%s') - ${_BUILDWORLD_START})); \ echo ">>> World built in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" @@ -1342,11 +1342,11 @@ installcheck: _installcheck_world _installcheck_kernel .PHONY _installcheck_world: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check world started on `LC_ALL=C date`" + @echo ">>> Install check world started on `date -Iseconds`" @echo "--------------------------------------------------------------" _installcheck_kernel: .PHONY @echo "--------------------------------------------------------------" - @echo ">>> Install check kernel started on `LC_ALL=C date`" + @echo ">>> Install check kernel started on `date -Iseconds`" @echo "--------------------------------------------------------------" # @@ -1635,14 +1635,14 @@ .endif @echo @echo "--------------------------------------------------------------" - @echo ">>> Installing everything started on `LC_ALL=C date`" + @echo ">>> Installing everything started on `date -Iseconds`" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install .for libcompat in ${libcompats} ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install${libcompat} .endfor @echo "--------------------------------------------------------------" - @echo ">>> Installing everything completed on `LC_ALL=C date`" + @echo ">>> Installing everything completed on `date -Iseconds`" @seconds=$$(($$(date '+%s') - ${_INSTALLWORLD_START})); \ echo ">>> Install world completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @echo "--------------------------------------------------------------" @@ -1795,7 +1795,7 @@ @echo .for _kernel in ${BUILDKERNELS:Ndummy} @echo "--------------------------------------------------------------" - @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`" + @echo ">>> Kernel build for ${_kernel} started on `date -Iseconds`" @echo "--------------------------------------------------------------" @echo "===> ${_kernel}" mkdir -p ${KRNLOBJDIR} @@ -1837,7 +1837,7 @@ @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ @echo "--------------------------------------------------------------" - @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" + @echo ">>> Kernel build for ${_kernel} completed on `date -Iseconds`" @echo "--------------------------------------------------------------" .endfor @@ -1868,14 +1868,14 @@ false .endif @echo "--------------------------------------------------------------" - @echo ">>> Installing kernel ${INSTALLKERNEL} on $$(LC_ALL=C date)" + @echo ">>> Installing kernel ${INSTALLKERNEL} on $$(date -Iseconds)" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH:Q} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} METALOG=${METALOG} \ ${.TARGET:S/kernel//} @echo "--------------------------------------------------------------" - @echo ">>> Installing kernel ${INSTALLKERNEL} completed on $$(LC_ALL=C date)" + @echo ">>> Installing kernel ${INSTALLKERNEL} completed on $$(date -Iseconds)" @echo "--------------------------------------------------------------" @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ echo ">>> Install kernel(s) ${INSTALLKERNEL} completed in $$seconds seconds, ncpu: $$(${_ncpu_cmd})${.MAKE.JOBS:S/^/, make -j/}" @@ -1884,14 +1884,14 @@ .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--------------------------------------------------------------" - @echo ">>> Installing kernel ${_kernel} $$(LC_ALL=C date)" + @echo ">>> Installing kernel ${_kernel} $$(date -Iseconds)" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${_kernel}; \ ${CROSSENV} PATH=${TMPPATH:Q} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME}.${_kernel} METALOG=${METALOG} \ ${.TARGET:S/kernel//} @echo "--------------------------------------------------------------" - @echo ">>> Installing kernel ${_kernel} completed on $$(LC_ALL=C date)" + @echo ">>> Installing kernel ${_kernel} completed on $$(date -Iseconds)" @echo "--------------------------------------------------------------" .endfor @seconds=$$(($$(date '+%s') - ${_INSTALLKERNEL_START})); \ diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -45,12 +45,12 @@ LC_ALL=C; export LC_ALL u=${USER-root} h=${HOSTNAME-`hostname`} if [ -n "$SOURCE_DATE_EPOCH" ]; then - if ! t=$(date -ur $SOURCE_DATE_EPOCH 2>/dev/null); then + if ! t=$(date -ur $SOURCE_DATE_EPOCH -Iseconds 2>/dev/null); then echo "Invalid SOURCE_DATE_EPOCH" >&2 exit 1 fi else - t="${NEWVERS_DATE:-`date`}" + t="${NEWVERS_DATE:-`date -Iseconds`}" fi r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1` diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -194,12 +194,12 @@ d=$builddir h=${HOSTNAME:-$(hostname)} if [ -n "$SOURCE_DATE_EPOCH" ]; then - if ! t=$(date -ur $SOURCE_DATE_EPOCH 2>/dev/null); then + if ! t=$(date -ur $SOURCE_DATE_EPOCH -Iseconds 2>/dev/null); then echo "Invalid SOURCE_DATE_EPOCH" >&2 exit 1 fi else - t=$(date) + t=$(date -Iseconds) fi i=$(${MAKE:-make} -V KERN_IDENT) compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep -w 'version') diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -171,7 +171,7 @@ ############################################################ MAIN -f_dprintf "Began Installation at %s" "$( date )" +f_dprintf "Began Installation at %s" "$(date -Iseconds)" environment_save @@ -482,7 +482,7 @@ bsdinstall entropy bsdinstall umount -f_dprintf "Installation Completed at %s" "$( date )" +f_dprintf "Installation Completed at %s" "$(date -Iseconds)" ################################################################################ # END diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -149,7 +149,7 @@ : ${BSDDIALOG_OK=0} -f_dprintf "Began Installation at %s" "$( date )" +f_dprintf "Began Installation at %s" "$(date -Iseconds)" if [ -z "$1" ]; then error "Directory can not be empty\n\nUsage:\nbsdinstall jail directory" @@ -223,7 +223,7 @@ bsdinstall entropy -f_dprintf "Installation Completed at %s" "$(date)" +f_dprintf "Installation Completed at %s" "$(date -Iseconds)" exit $SUCCESS ################################################################################ diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -85,7 +85,7 @@ SCRIPT="$1" shift -f_dprintf "Began Installation at %s" "$( date )" +f_dprintf "Began Installation at %s" "$(date -Iseconds)" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC rm -f $TMPDIR/bsdinstall-installscript-setup @@ -105,7 +105,7 @@ export debugFile="$BSDINSTALL_LOG" f_quietly f_debug_init # NB: Being scripted, let debug go to terminal for invalid debugFile - f_dprintf "Began Installation at %s" "$( date )" + f_dprintf "Began Installation at %s" "$(date -Iseconds)" fi # Make partitions @@ -177,7 +177,7 @@ zpool export $ZFSBOOT_POOL_NAME fi -f_dprintf "Installation Completed at %s" "$( date )" +f_dprintf "Installation Completed at %s" "$(date -Iseconds)" trap - EXIT exit $SUCCESS