# And then some bloat because I happen to like the ISO 8601 time # format. sub time2iso (;$) { my $time = shift; $time = time unless defined $time; my($sec,$min,$hour,$mday,$mon,$year) = localtime($time); sprintf("%04d-%02d-%02dT%02d:%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec); } Perl ISO 8601 T Separated Formatting Code |