aboutsummaryrefslogtreecommitdiff
path: root/src/deliverable.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-02-12 23:51:36 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-02-12 23:51:36 -0500
commita09f506ff3ed6a47eb7b3cb045164defd6b8d198 (patch)
tree191edf8dd4ceb479bcce7da7f0c9d983a78a417f /src/deliverable.c
parentca6fb164907c3fb530f049864d6a986f85b22cdf (diff)
downloadstasis-a09f506ff3ed6a47eb7b3cb045164defd6b8d198.tar.gz
Add Delivery.info.time_str_epoch member to store Unix epoch as a string.
Diffstat (limited to 'src/deliverable.c')
-rw-r--r--src/deliverable.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/deliverable.c b/src/deliverable.c
index 6d868e0..72e4eff 100644
--- a/src/deliverable.c
+++ b/src/deliverable.c
@@ -277,6 +277,12 @@ int delivery_init(struct Delivery *ctx, struct INIFILE *ini, struct INIFILE *cfg
// Record timestamp used for release
time(&ctx->info.time_now);
ctx->info.time_info = localtime(&ctx->info.time_now);
+ ctx->info.time_str_epoch = calloc(OMC_TIME_STR_MAX, sizeof(*ctx->info.time_str_epoch));
+ if (!ctx->info.time_str_epoch) {
+ msg(OMC_MSG_ERROR, "Unable to allocate memory for Unix epoch string\n");
+ return -1;
+ }
+ snprintf(ctx->info.time_str_epoch, OMC_TIME_STR_MAX - 1, "%li", ctx->info.time_now);
if (cfg) {
getter(cfg, "default", "conda_staging_dir", INIVAL_TYPE_STR)