我需要以格式获取时间,"20130808 12:12:12.123"
即"yyyymmdd hour:min:sec.msec"
.
我试过了
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
$mon++;
if ($mon<10){$mon="0$mon"}
if ($mday<10){$mday="0$mday"}
if ($hour<10){$hour="0$hour"}
if ($min<10){$min="0$min"}
if ($sec<10){$sec="0$sec"} but this doesn't provide the `msec` as a part of time.
我怎样才能做到这一点 ?