mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-10 02:10:47 +00:00
Adjustments of clock parsing from dlms
This commit is contained in:
@@ -404,10 +404,10 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
|
||||
if(meterTs != NULL) {
|
||||
AmsOctetTimestamp* amst = (AmsOctetTimestamp*) meterTs;
|
||||
time_t ts = decodeCosemDateTime(amst->dt);
|
||||
if(meterType == AmsTypeAidon || meterType == AmsTypeKamstrup) {
|
||||
meterTimestamp = ts - 3600;
|
||||
} else {
|
||||
meterTimestamp = ts;
|
||||
if(amst->dt.deviation == 0x8000) { // Deviation not specified, adjust from localtime to UTC
|
||||
meterTimestamp = tz.toUTC(ts);
|
||||
} else if(meterType == AmsTypeAidon) {
|
||||
meterTimestamp = ts - 3600; // 21.09.24, the clock is now correct
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user