# This is called from /etc/rc.d/rc.S within the Slackware Installer.
#
# The Slackware ARM Installer contains a build date stamp, which we'll use
# to set the clock if the current time is older than that date.
# This enables at least a more reasonable (at least initially after a
# Slackware release) date to be set, for machines without an RTC or where
# the RTC's date has yet to be set.
#
# mozes@slackware.com
# Jan 2022

[ -f /.installer_build_date ] && {
   BLDDATE=$( grep -Ev '^$' /.installer_build_date )
   [ ! -z "${BLDDATE}" ] && {
      [ $( date +%s ) -le $BLDDATE ] && date -s "@${BLDDATE}" > /dev/null 2>&1 ;} ;}
