2010-10-17 21:50:55 +02:00
|
|
|
|
|
|
|
int cmd_date(char param[])
|
|
|
|
{
|
2021-06-12 23:34:41 +02:00
|
|
|
unsigned date;
|
|
|
|
unsigned time;
|
2010-10-17 21:50:55 +02:00
|
|
|
|
2021-06-12 23:34:41 +02:00
|
|
|
date = kol_system_date_get();
|
|
|
|
printf(CMD_DATE_DATE_FMT,
|
|
|
|
(date&0xf00000)>>20, (date&0xf0000)>>16, // day
|
|
|
|
(date&0xf000)>>12, (date&0xf00)>>8, //month
|
|
|
|
(date&0xf0)>>4, (date&0xf) ); // year
|
2010-10-17 21:50:55 +02:00
|
|
|
|
|
|
|
|
2021-06-12 23:34:41 +02:00
|
|
|
time = kol_system_time_get();
|
|
|
|
printf(CMD_DATE_TIME_FMT,
|
|
|
|
(time&0xf0)>>4, (time&0xf), // hours
|
|
|
|
(time&0xf000)>>12, (time&0xf00)>>8, // minutes
|
|
|
|
(time&0xf00000)>>20, (time&0xf0000)>>16 ); // seconds
|
2010-10-17 21:50:55 +02:00
|
|
|
|
2021-06-12 23:34:41 +02:00
|
|
|
return TRUE;
|
2010-10-17 21:50:55 +02:00
|
|
|
}
|
2013-02-17 16:22:51 +01:00
|
|
|
|