diff --git a/adafruit_gps.py b/adafruit_gps.py index 097a559..a6a21de 100644 --- a/adafruit_gps.py +++ b/adafruit_gps.py @@ -148,10 +148,10 @@ def _parse_gpgga(self, args): if data is None or len(data) != 14: return # Unexpected number of params. # Parse fix time. - time_utc = _parse_float(data[0]) + time_utc = int(_parse_float(data[0])) if time_utc is not None: hours = time_utc // 10000 - mins = int((time_utc // 100) % 100) + mins = (time_utc // 100) % 100 secs = time_utc % 100 # Set or update time to a friendly python time struct. if self.timestamp_utc is not None: @@ -184,10 +184,10 @@ def _parse_gprmc(self, args): if data is None or len(data) < 11: return # Unexpected number of params. # Parse fix time. - time_utc = _parse_float(data[0]) + time_utc = int(_parse_float(data[0])) if time_utc is not None: hours = time_utc // 10000 - mins = int((time_utc // 100) % 100) + mins = (time_utc // 100) % 100 secs = time_utc % 100 # Set or update time to a friendly python time struct. if self.timestamp_utc is not None: