|
|
@ -16,7 +16,7 @@ int shell_date(struct console *con, size_t argc, const char **argv) |
|
|
|
rtc_get_time(&now); |
|
|
|
rtc_get_time(&now); |
|
|
|
|
|
|
|
|
|
|
|
fprintf(con->fp, "%02d:%02d:%02d %02d-%02d-%d\n", |
|
|
|
fprintf(con->fp, "%02d:%02d:%02d %02d-%02d-%d\n", |
|
|
|
now.tm_hour + 1, now.tm_min, now.tm_sec, |
|
|
|
now.tm_hour, now.tm_min, now.tm_sec, |
|
|
|
now.tm_mday, now.tm_mon + 1, now.tm_year + 1900); |
|
|
|
now.tm_mday, now.tm_mon + 1, now.tm_year + 1900); |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
@ -55,7 +55,7 @@ int shell_set_date(struct console *con, size_t argc, const char **argv) |
|
|
|
rtc_init(&now); |
|
|
|
rtc_init(&now); |
|
|
|
|
|
|
|
|
|
|
|
fprintf(con->fp, "%02d:%02d:%02d %02d-%02d-%d\n", |
|
|
|
fprintf(con->fp, "%02d:%02d:%02d %02d-%02d-%d\n", |
|
|
|
now.tm_hour + 1, now.tm_min, now.tm_sec, |
|
|
|
now.tm_hour, now.tm_min, now.tm_sec, |
|
|
|
now.tm_mday, now.tm_mon + 1, now.tm_year + 1900); |
|
|
|
now.tm_mday, now.tm_mon + 1, now.tm_year + 1900); |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|