From 1527ee7d454e9fd21f3896f53973c1db88e69c11 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Mon, 3 Jan 2022 09:05:04 +0100 Subject: [PATCH] Timezone conversion for Kaifa --- src/IEC6205675.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/IEC6205675.cpp b/src/IEC6205675.cpp index 013e40b3..acf6f725 100644 --- a/src/IEC6205675.cpp +++ b/src/IEC6205675.cpp @@ -102,11 +102,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, CosemDateTime packag if(data->oct.length == 0x0C) { AmsOctetTimestamp* amst = (AmsOctetTimestamp*) data; time_t ts = getTimestamp(amst->dt); - if(meterType == AmsTypeKamstrup || meterType == AmsTypeAidon) { - this->meterTimestamp = tz.toUTC(ts); - } else { - meterTimestamp = ts; - } + meterTimestamp = tz.toUTC(ts); } } } @@ -260,7 +256,7 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, CosemDateTime packag AmsOctetTimestamp* amst = (AmsOctetTimestamp*) meterTs; time_t ts = getTimestamp(amst->dt); if(meterType == AmsTypeKamstrup || meterType == AmsTypeAidon) { - this->meterTimestamp = tz.toUTC(ts); + meterTimestamp = tz.toUTC(ts); } else { meterTimestamp = ts; }