Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1.  
  2.  
  3. void cmd_date()
  4. {
  5. unsigned date;
  6. unsigned time;
  7.  
  8. date = kol_system_date_get();
  9. printf("  date [dd.mm.yy]: %x%x.%x%x.%x%x",
  10.         (date&0xf00000)>>20, (date&0xf0000)>>16,  // day
  11.         (date&0xf000)>>12, (date&0xf00)>>8, //month
  12.         (date&0xf0)>>4, (date&0xf) ); // year
  13.  
  14.  
  15. time = kol_system_time_get();
  16.  
  17. printf("\n\r  time [hh:mm:ss]: %x%x:%x%x:%x%x\n\r",
  18.         (time&0xf0)>>4, (time&0xf), // hours
  19.         (time&0xf000)>>12, (time&0xf00)>>8, // minutes
  20.         (time&0xf00000)>>20, (time&0xf0000)>>16 ); // seconds
  21.  
  22. }
  23.