diff --git a/firmware/application/app_ais.cpp b/firmware/application/app_ais.cpp index c18b00f6..89b33ac2 100644 --- a/firmware/application/app_ais.cpp +++ b/firmware/application/app_ais.cpp @@ -158,7 +158,7 @@ static std::string format_latlon_normalized(const int32_t normalized) { static std::string format_datetime( const DateTime& datetime ) { - return ui::to_string_dec_uint(datetime.year, 4) + "/" + + return ui::to_string_dec_uint(datetime.year, 4, '0') + "/" + ui::to_string_dec_uint(datetime.month, 2, '0') + "/" + ui::to_string_dec_uint(datetime.day, 2, '0') + " " + ui::to_string_dec_uint(datetime.hour, 2, '0') + ":" + diff --git a/firmware/application/app_tpms.cpp b/firmware/application/app_tpms.cpp index 67da089d..d159cecf 100644 --- a/firmware/application/app_tpms.cpp +++ b/firmware/application/app_tpms.cpp @@ -50,7 +50,7 @@ ManchesterFormatted TPMSModel::on_packet(const TPMSPacketMessage& message) { rtc::RTC datetime; rtcGetTime(&RTCD1, &datetime); std::string timestamp = - ui::to_string_dec_uint(datetime.year(), 4) + + ui::to_string_dec_uint(datetime.year(), 4, '0') + ui::to_string_dec_uint(datetime.month(), 2, '0') + ui::to_string_dec_uint(datetime.day(), 2, '0') + ui::to_string_dec_uint(datetime.hour(), 2, '0') +