A very useful function of the unix shell is the date function. It allows you to get the current system time in any format you need. Some examples:

date : returns the current date / time
date -u : returns the current UTC date / time
date +"%s" : returns the current date / time in unix timestamp format (seconds since the epoch)