Add package timestamp if missing

This commit is contained in:
Gunnar Skjold
2024-11-03 11:28:03 +01:00
parent 718eef7999
commit c1309e9a13

View File

@@ -18,7 +18,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
TimeChangeRule CET = {"CET ", Last, Sun, Oct, 3, 60};
Timezone tz(CEST, CET);
this->packageTimestamp = ctx.timestamp;
this->packageTimestamp = ctx.timestamp == 0 ? time(nullptr) : ctx.timestamp;
val = getNumber(AMS_OBIS_ACTIVE_IMPORT, sizeof(AMS_OBIS_ACTIVE_IMPORT), ((char *) (d)));
if(val == NOVALUE) {