aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/vppapigen/node.c')
-rw-r--r--src/tools/vppapigen/node.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/vppapigen/node.c b/src/tools/vppapigen/node.c
index 15868ee5aaa..1f9905baca1 100644
--- a/src/tools/vppapigen/node.c
+++ b/src/tools/vppapigen/node.c
@@ -1114,7 +1114,12 @@ char *fixup_input_filename(void)
void generate_top_boilerplate(FILE *fp)
{
- char *datestring = ctime(&starttime);
+ time_t curtime;
+ char *datestring;
+ char *source_date_epoch;
+ if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL || (curtime = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0)
+ curtime = starttime;
+ datestring = asctime(gmtime(&curtime));
fixed_name = fixup_input_filename();
datestring[24] = 0;