Subversion Repositories Kolibri OS

Rev

Rev 1665 | Rev 3247 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2.  
  3. int cmd_date(char param[])
  4. {
  5. unsigned date;
  6. unsigned time;
  7.  
  8. date = kol_system_date_get();
  9. #if LANG_ENG
  10.         printf("  Date [dd.mm.yy]: %x%x.%x%x.%x%x",
  11. #elif LANG_RUS
  12.         printf("  „ â  [¤¤.¬¬.££]: %x%x.%x%x.%x%x",
  13. #endif
  14.         (date&0xf00000)>>20, (date&0xf0000)>>16,  // day
  15.         (date&0xf000)>>12, (date&0xf00)>>8, //month
  16.         (date&0xf0)>>4, (date&0xf) ); // year
  17.  
  18.  
  19. time = kol_system_time_get();
  20.  
  21. #if LANG_ENG
  22.         printf("\n\r  Time [hh:mm:ss]: %x%x:%x%x:%x%x\n\r",
  23. #elif LANG_RUS
  24.         printf("\n\r  ‚६ï [çç:¬¬:áá]: %x%x:%x%x:%x%x\n\r",
  25. #endif
  26.         (time&0xf0)>>4, (time&0xf), // hours
  27.         (time&0xf000)>>12, (time&0xf00)>>8, // minutes
  28.         (time&0xf00000)>>20, (time&0xf0000)>>16 ); // seconds
  29.  
  30. return TRUE;
  31. }
  32.