#3257 summermode back and a test for #3094

This commit is contained in:
proddy
2026-10-01 17:52:52 +02:00
parent 635daa8ab8
commit e4f9d4a96d
13 changed files with 476 additions and 325 deletions
+6 -5
View File
@@ -106,14 +106,15 @@ void Shell::output_logs() {
}
while (1) {
time_t offset = time(nullptr) - uuid::get_uptime_sec();
if (offset < 1500000000L) {
int64_t offset_ms = uuid::get_wall_offset_ms();
if (offset_ms < 1500000000000LL) {
print(uuid::log::format_timestamp_ms(message.content_->uptime_ms, 3));
} else {
time_t t1 = offset + (time_t)(message.content_->uptime_ms / 1000);
char timestr[25];
int64_t wall_ms = offset_ms + (int64_t)message.content_->uptime_ms;
time_t t1 = (time_t)(wall_ms / 1000);
char timestr[25];
strftime(timestr, 25, "%FT%T", localtime(&t1));
printf("%s.%03d", timestr, (uint16_t)(message.content_->uptime_ms % 1000));
printf("%s.%03d", timestr, (int)(wall_ms % 1000));
}
printf(" %c %lu: [%s] ", uuid::log::format_level_char(message.content_->level), message.id_, message.content_->name);