Use the GNU utility, date. Check 'date --help' or 'man date' for all of the options, which are too numerous to list here. With no parameters, this utility will display the day of the week, the month, date, time in hh:mm:ss, the timezone and the year. There are options to customize the default output in dozens of different ways.
Edit Steps
Edit Tips
- Follow the instructions in http://www.wikihow.com/Change-the-Timezone-in-Linux to make sure your system is configured to the correct timezone.
- One way to synchronize your computer's clock to the international standard: 'ntpdate 2.north-america.pool.ntp.org' if you are in North America.
- http://support.ntp.org/bin/view/Servers/NTPPoolServers lists time servers that might be closer (it doesn't matter which one you use, the ntp servers will include the round-trip network latency in the response). You can download the Network Time Protocol software from that site if it is not included in your distribution.
- For a more comprehensive explanation of the 'date' command, which is included in the GNU Coreutils, visit http://www.gnu.org/software/coreutils/manual/coreutils.html#date-invocation
Edit Related wikiHows
Articles for You to Write
Article Info
Last edited:
August 29, 2011 by Maluniu
Categories:
Linux
Recent edits by: Teresa, Travis Derouin, Me13 (see all)