Skip to content

Commit

Permalink
Fixed Aidon timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
gskjold committed Aug 23, 2022
1 parent f18171f commit e232b87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/IEC6205675.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,9 @@ 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 == AmsTypeKamstrup || meterType == AmsTypeAidon) {
if(meterType == AmsTypeAidon) {
meterTimestamp = ts - 3600;
} else if(meterType == AmsTypeKamstrup) {
meterTimestamp = tz.toUTC(ts);
} else {
meterTimestamp = ts;
Expand Down

0 comments on commit e232b87

Please sign in to comment.