diff --git a/src/gpsread.cpp b/src/gpsread.cpp index 27d12ca2..d6c58b99 100644 --- a/src/gpsread.cpp +++ b/src/gpsread.cpp @@ -73,9 +73,8 @@ time_t get_gpstime(void) { if ((gps.time.age() < 1500) && (gps.time.isValid())) { t = tmConvert_t(gps.date.year(), gps.date.month(), gps.date.day(), gps.time.hour(), gps.time.minute(), gps.time.second()); - ESP_LOGD(TAG, "GPS time: %d/%d/%d %d:%d:%d", gps.date.year(), - gps.date.month(), gps.date.day(), gps.time.hour(), - gps.time.minute(), gps.time.second()); + ESP_LOGD(TAG, "GPS time: %d/%d/%d %d:%d:%d", year(t), month(t), day(t), + hour(t), minute(t), second(t)); } else { ESP_LOGW(TAG, "GPS has no confident time"); }