diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog
index 7f6ea2fcbfccb2e0ee5ec4f5b5528409e9029955..06fdcbf9d74105fc8484ef11d7e71ffbc94a12ad 100644
--- a/smartmontools/ChangeLog
+++ b/smartmontools/ChangeLog
@@ -1,5 +1,12 @@
 $Id$
 
+2022-02-29  Christian Franke  <franke@computer.org>
+
+	configure.ac: Comment out release timestamp.
+	Set related environment vars only if timestamp is set.
+	utility.cpp: Add "pre-" or "pre-release" if release
+	timestamp is not set.  Don't print empty timestamp.
+
 2022-02-28  Douglas Gilbert  <dgilbert@interlog.com>
 
 	utility.cpp: the previous patch bumped the version number
diff --git a/smartmontools/configure.ac b/smartmontools/configure.ac
index c1bc8528e3680adf6b01f904e0dbfd8bf88499ef..d8f5395362307434902ba69ebdee45d98e93b082 100644
--- a/smartmontools/configure.ac
+++ b/smartmontools/configure.ac
@@ -9,13 +9,17 @@ AM_INIT_AUTOMAKE([1.10 foreign])
 # Version of drive database branch
 smartmontools_drivedb_version=7.3
 
-smartmontools_cvs_tag=`echo '$Id$'`
-smartmontools_release_date=2022-02-28
-smartmontools_release_time="16:33:40 UTC"
+# Set by 'do_release' script, commented out when release number is bumped.
+smartmontools_release_date= # 2022-02-28
+smartmontools_release_time= # "16:33:40 UTC"
+
+if test -n "$smartmontools_release_date"; then
+  AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_DATE, "$smartmontools_release_date",    [smartmontools Release Date])
+  AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_TIME, "$smartmontools_release_time",    [smartmontools Release Time])
+fi
 
+smartmontools_cvs_tag=`echo '$Id$'`
 AC_DEFINE_UNQUOTED(SMARTMONTOOLS_CONFIGURE_ARGS, "$ac_configure_args",             [smartmontools Configure Arguments])
-AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_DATE,   "$smartmontools_release_date",    [smartmontools Release Date])
-AC_DEFINE_UNQUOTED(SMARTMONTOOLS_RELEASE_TIME,   "$smartmontools_release_time",    [smartmontools Release Time])
 AC_DEFINE_UNQUOTED(CONFIG_H_CVSID,               "$smartmontools_cvs_tag",         [smartmontools CVS Tag])
 AC_DEFINE_UNQUOTED(PACKAGE_HOMEPAGE,             "https://www.smartmontools.org/", [smartmontools Home Page])
 
diff --git a/smartmontools/utility.cpp b/smartmontools/utility.cpp
index 791d8287f454a1f01b6490c12c3d2eadf1884ade..1e2e4c96cbc5a7d51f29ec967298aff4dec83f1f 100644
--- a/smartmontools/utility.cpp
+++ b/smartmontools/utility.cpp
@@ -86,7 +86,11 @@ const char * packet_types[] = {
 std::string format_version_info(const char * prog_name, bool full /*= false*/)
 {
   std::string info = strprintf(
-    "%s pre-release " PACKAGE_VERSION " "
+    "%s "
+#ifndef SMARTMONTOOLS_RELEASE_DATE
+      "pre-"
+#endif
+      PACKAGE_VERSION " "
 #ifdef SMARTMONTOOLS_SVN_REV
       SMARTMONTOOLS_SVN_DATE " r" SMARTMONTOOLS_SVN_REV
 #else
@@ -107,8 +111,12 @@ std::string format_version_info(const char * prog_name, bool full /*= false*/)
     "version 2, or (at your option) any later version.\n"
     "See https://www.gnu.org for further details.\n"
     "\n"
-    "smartmontools pre-release " PACKAGE_VERSION
+#ifndef SMARTMONTOOLS_RELEASE_DATE
+    "smartmontools pre-release " PACKAGE_VERSION "\n"
+#else
+    "smartmontools release " PACKAGE_VERSION
       " dated " SMARTMONTOOLS_RELEASE_DATE " at " SMARTMONTOOLS_RELEASE_TIME "\n"
+#endif
 #ifdef SMARTMONTOOLS_SVN_REV
     "smartmontools SVN rev " SMARTMONTOOLS_SVN_REV
       " dated " SMARTMONTOOLS_SVN_DATE " at " SMARTMONTOOLS_SVN_TIME "\n"