The date program is a handy way of finding out what time the operating system thinks it is. Optionally, the superuser can set the system clock with this program. There are options to specially format the date in number of ways.
Using date to set the time is not a high precision operation. A related command, hwclock can be used to access or set the real time (hardware) clock on the system. There are at least a couple of protocols for updating the system clock when connected to the Internet, and there are also methods of setting the clock via the Global Positioning System.