my $epoch = time(); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($epoch); my $gm_str = gmtime(); # note that default epoch for gmtime is NOW() printf '%d seconds ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = %s %s %s ', $epoch, "($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)", $gm_str, scalar(localtime); # need scalar(localtime) as print has list context __DATA__ 1099351947 seconds ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = (27,32,23,1,10,104,1,305,0) Mon Nov 1 23:32:27 2004 Tue Nov 2 10:32:27 2004