One of the frequent conversion I do on UNIX is to and from epoch time to regular date time. Epoch time is the number of seconds elassed since midnight 1970 till now. It is widely used in the UNIX operating systems to represent timestamp for an event etc. For example, it is used to store the last time a password was changed by a user, which will be used by the OS to lock the user if the password has expired. As a unix administrator, we have to frequently convert this information to and from epoch time to find out when was the last time the password was changed for a particular user. There are many online sites available for this conversions. But most of the time we will be needing this to incorporate in a script run from the system where you cannot access online resources. Here are some of the 'one liners' we can use to convert to and from epoch time:
1. Print curent epoch time:
date +%s
perl -e 'print time'
2. Convert regular time to epoch time:
date +%s -d
3. Convert epoch time to regular time:
perl -e 'print scalar (localitme ([epoch]))'
Refer to this site for more information about conversions in other programming languages : http://www.epochconverter.com/