Skip to content

Instantly share code, notes, and snippets.

View thinkhy's full-sized avatar
🐕
On vacation

thinkhy thinkhy

🐕
On vacation
View GitHub Profile
@thinkhy
thinkhy / gist:772306
Created January 10, 2011 03:29
Write_Log
sub getTime
{
my $time = shift || time();
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time);
$year += 1900;
$mon ++;
$min = '0'.$min if length($min) < 2;
$sec = '0'.$sec if length($sec) < 2;