If you are working on an Ubuntu server installation that comes in the command line only variation, you might at any point in time want to see just what exactly the server’s time is currently set to.

Needless to say, getting the current date and time information is pretty damn easy – simply call:


Seriously, as simple as that.

Now if you wanted to say change the date or time on the server, it turns out that this is pretty simple to acheive as well:

Simply provide a parameter to the date function!

So we would then have:

sudo date newdatetimestring

Of course, you won’t exactly use “newdatetimestring”, rather it stands for the date time format “nnddhhmmyyy.ss” where nn is a two digit month (01 to 12), dd is a two digit day (01 to 31), hh is two digit hour (00 to 23), yyyy a four digit year and finally .ss which is two digit seconds (00 to 59) [notice the ‘period’ there by the way].