Skip to content

Instantly share code, notes, and snippets.

@muffl0n
Created May 21, 2015 13:48
Show Gist options
  • Save muffl0n/5eea5b6ea0852a27b2f5 to your computer and use it in GitHub Desktop.
Save muffl0n/5eea5b6ea0852a27b2f5 to your computer and use it in GitHub Desktop.
sub GetDate
{
@Months = ('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
@Now = localtime(time());
$Month = $Months[$Now[4]];
$Year = $Now[5]+1900;
$todaydate = localtime(time());
@day = split(/ +/,$todaydate);
@time = split(/:/,$day[3]);
return "$Year$Month$Now[3]_$time[0]$time[1]$time[2]";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment