Create an Account
username: password:
 
  MemeStreams Logo

MemeStreams Discussion

search


This page contains all of the posts and discussion on MemeStreams referencing the following web page: Perl ISO 8601 T Separated Formatting Code. You can find discussions on MemeStreams as you surf the web, even if you aren't a MemeStreams member, using the Threads Bookmarklet.

Perl ISO 8601 T Separated Formatting Code
by Lost at 2:35 am EST, Dec 27, 2008

# 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);
}


 
 
Powered By Industrial Memetics