Skip to content

Commit

Permalink
fix bad time conversion bug...
Browse files Browse the repository at this point in the history
  • Loading branch information
mbehr1 committed Jul 12, 2015
1 parent 343b19a commit 620654d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/protocols/MeterOMS.cpp
Expand Up @@ -574,8 +574,8 @@ double MeterOMS::get_record_value(mbus_data_record *record) const
case 0x06: // 6 byte integer (48 bit)
if (vif == 0x6d) { // 48bit time value (CP48)
struct tm t;
t.tm_sec = record->data[0] & 0x2f;
t.tm_min = record->data[1] & 0x2f;
t.tm_sec = record->data[0] & 0x3f;
t.tm_min = record->data[1] & 0x3f;
t.tm_hour = record->data[2] & 0x1f;
t.tm_mday = record->data[3] & 0x1f;
t.tm_mon = record->data[4] & 0xf;
Expand Down

0 comments on commit 620654d

Please sign in to comment.