Really make sure BUILD_TIME doesn't have a leading zero.

date +'%k%M%S' still gives a leading zero in the hour after midnight...

Add a leading 1 and remove it in xf86PrintBanner().
This commit is contained in:
Clark Rawlins 2007-06-11 16:53:38 +02:00 committed by Michel Dänzer
parent 54e023cec0
commit 8d5f4368ea
2 changed files with 2 additions and 2 deletions

View File

@ -1948,7 +1948,7 @@ AM_CONDITIONAL(SUN_KBD_MODE, [test x$KBD_MODE_TYPE = xsun])
BUILD_DATE="$(date +'%Y%m%d')"
AC_SUBST([BUILD_DATE])
BUILD_TIME="$(date +'%k%M%S')"
BUILD_TIME="$(date +'1%H%M%S')"
AC_SUBST([BUILD_TIME])
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"

View File

@ -1733,7 +1733,7 @@ xf86PrintBanner()
#if defined(BUILD_TIME)
t.tm_sec = BUILD_TIME % 100;
t.tm_min = (BUILD_TIME / 100) % 100;
t.tm_hour = (BUILD_TIME / 10000);
t.tm_hour = (BUILD_TIME / 10000) % 100;
if (strftime(buf, sizeof(buf), "%d %B %Y %I:%M:%s%p", &t))
ErrorF("Build Date: %s\n", buf);
#else