http://www.hmug.org/man/3/strftime.php
http://www.hmug.org/man/3/ctime.php
gmtime(), localtime(), strftime() would seem to be functions worth a look.