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].