here is something in python close to what you want.:
# takes the number of seconds since 1900 jan 1st 00:00:00 and returns it
# as a string representation in the form "Sat Jun 27 13:13:41 2009"
TIME1970 = 2208988800L
t = struct.unpack( '!12I', data )
t -= TIME1970
timeString = '%s' % time.ctime(t)
print "timeString = ", timeString