!103 【轻量级 PR】:update shell/full/src/cmds/date_shell.c.

Merge pull request !103 from Ho Hang/N/A
This commit is contained in:
openharmony_ci 2021-03-30 14:14:11 +08:00 committed by Gitee
commit 014b40b2a2
1 changed files with 3 additions and 3 deletions

View File

@ -153,7 +153,7 @@ STATIC INT32 OsStrToTm(const CHAR *str, struct tm *tm)
} }
if (tm->tm_year < 70) { /* 70:the year is starting in 1970,tm_year must be greater than 70 */ if (tm->tm_year < 70) { /* 70:the year is starting in 1970,tm_year must be greater than 70 */
PRINTK("\nUsage: date -s set system time range from 1970.\n"); PRINTK("\nUsage: date -s set system time starting from 1970.\n");
return DATE_ERR; return DATE_ERR;
} }
@ -202,7 +202,7 @@ STATIC INT32 OsDateSetTime(const CHAR *timeStr)
struct timeval64 setTime = {0}; struct timeval64 setTime = {0};
if (gettimeofday64(&nowTime, NULL)) { if (gettimeofday64(&nowTime, NULL)) {
PRINTK("settime failed...\n"); PRINTK("Setting time failed...\n");
return DATE_ERR; return DATE_ERR;
} }
@ -217,7 +217,7 @@ STATIC INT32 OsDateSetTime(const CHAR *timeStr)
setTime.tv_sec = mktime64(&tm); setTime.tv_sec = mktime64(&tm);
if (settimeofday64(&setTime, NULL)) { if (settimeofday64(&setTime, NULL)) {
PRINTK("settime failed...\n"); PRINTK("setting time failed...\n");
return DATE_ERR; return DATE_ERR;
} }