loader: Fix override expiration functionality
Change-Id: Ib2415cb1a9218930dc68827abdd1587bd0672342
diff --git a/loader/loader.c b/loader/loader.c
index a20f918..215a9d7 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -1589,7 +1589,7 @@
.tm_min = prop->expiration.minute,
.tm_hour = prop->expiration.hour,
.tm_mday = prop->expiration.day,
- .tm_mon = prop->expiration.month,
+ .tm_mon = prop->expiration.month - 1,
.tm_year = prop->expiration.year - 1900,
.tm_isdst = tm_current.tm_isdst,
// wday and yday are ignored by mktime
@@ -2694,7 +2694,7 @@
}
props->is_override = true;
- expiration = cJSON_GetObjectItem(layer_node, "expiration");
+ expiration = cJSON_GetObjectItem(layer_node, "expiration_date");
if (NULL != expiration) {
char date_copy[32];
uint8_t cur_item = 0;
@@ -2703,7 +2703,7 @@
temp = cJSON_Print(expiration);
if (temp == NULL) {
loader_log(inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0,
- "Problem accessing layer value 'expiration' in manifest JSON file, skipping this layer");
+ "Problem accessing layer value 'expiration_date' in manifest JSON file, skipping this layer");
result = VK_ERROR_OUT_OF_HOST_MEMORY;
goto out;
}