Skip to content

Commit

Permalink
Device time for engine hours
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Oct 19, 2024
1 parent a1c96b7 commit bba66a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/traccar/handler/EngineHoursHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void onPosition(Position position, Callback callback) {
if (last != null) {
long hours = last.getLong(Position.KEY_HOURS);
if (last.getBoolean(Position.KEY_IGNITION) && position.getBoolean(Position.KEY_IGNITION)) {
hours += position.getFixTime().getTime() - last.getFixTime().getTime();
hours += position.getDeviceTime().getTime() - last.getDeviceTime().getTime();
}
if (hours != 0) {
position.set(Position.KEY_HOURS, hours);
Expand Down

0 comments on commit bba66a2

Please sign in to comment.