¾Æ·¡ ·çƾÀ» ½áº¸¼¼¿ä. &get_time; À̶ó°í ½ÇÇàÇϸé $now_date °ªÀÌ ³ª¿É´Ï´Ù.
sub get_time {
$time = time; local($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time); $sec = "0" . $sec if ($sec < 10); $min = "0" . $min if ($min < 10); $hour = "0" . $hour if ($hour < 10); $mday = "0" . $mday if ($mday < 10); local $month = $mon + 1; $month = "0" . $month if ($month < 10); if ($year > 99) { $year -= 100; $year = "0" . $year if ($year < 10); $year = "20" . $year; } else { $year = "19" . $year; } $now_date = "$year³â$month¿ù$mdayÀÏ"; }
|