--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,7 @@ import os
 import pkg_resources
 import setuptools
 import sys
+import time
 
 # check minimum supported Python version
 if sys.version_info[:2] < (3, 6):
@@ -57,12 +58,22 @@ else:
     libraries = []
     library_dirs = []
 
+# Define the build time, either from SOURCE_DATE_EPOCH or the machine clock.
+# See <https://reproducible-builds.org/docs/source-date-epoch/> for details.
+build_time = time.strftime(
+        "%Y-%m-%d %H:%M:%S %Z",
+        time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
+)
+
 # setup the extension
 extension = setuptools.Extension(
         name="cx_Oracle",
         include_dirs=include_dirs,
         extra_compile_args=extra_compile_args,
-        define_macros=[("CXO_BUILD_VERSION", BUILD_VERSION)],
+        define_macros=[
+            ("CXO_BUILD_VERSION", BUILD_VERSION),
+            ("CXO_BUILD_TIME", build_time),
+        ],
         extra_link_args=extra_link_args,
         sources=sources + dpi_sources,
         depends=depends,
--- a/src/cxoModule.c
+++ b/src/cxoModule.c
@@ -584,7 +584,7 @@ static PyObject *cxoModule_initialize(vo
             CXO_BUILD_VERSION_STRING) < 0)
         return NULL;
     if (PyModule_AddStringConstant(module, "buildtime",
-            __DATE__ " " __TIME__) < 0)
+            CXO_BUILD_TIME_STRING) < 0)
         return NULL;
 
     // create and initialize future object
--- a/src/cxoModule.h
+++ b/src/cxoModule.h
@@ -20,6 +20,7 @@
 #define xstr(s)                         str(s)
 #define str(s)                          #s
 #define CXO_BUILD_VERSION_STRING        xstr(CXO_BUILD_VERSION)
+#define CXO_BUILD_TIME_STRING           xstr(CXO_BUILD_TIME)
 #define CXO_DRIVER_NAME                 "cx_Oracle : "CXO_BUILD_VERSION_STRING
 
 // define macro for clearing buffers
